You are here

function forena_get_html in Forena Reports 8

Same name and namespace in other branches
  1. 6.2 forena.common.inc \forena_get_html()
  2. 6 forena.common.inc \forena_get_html()
  3. 7.5 forena.common.inc \forena_get_html()
  4. 7 forena.common.inc \forena_get_html()
  5. 7.2 forena.common.inc \forena_get_html()
  6. 7.3 forena.common.inc \forena_get_html()
  7. 7.4 forena.common.inc \forena_get_html()

Accepts the name of the html tag, and the string the tag is in.

Returns the string within the html tag name

Parameters

string $tag: Name of tag

string $r_text: XML containing full tag.

File

./forena.common.inc, line 107
Common functions used throughout the project but loaded in this file to keep the module file lean.

Code

function forena_get_html($tag, $r_text) {
  $open = strpos($r_text, $tag);
  $close = strpos($r_text, '>', $open);
  $next = strpos($r_text, '<', $close + 1);
  $str = substr($r_text, $close + 1, $next - ($close + 1));
  return $str;
}