I'm finally getting some progress on my portal system. But, Ive hit a wall, this seemingly perfect code does not work as it should:
Code: Select all
<?php
function find($string,$opener,$closer)
{
$part1 = explode($opener,$string);
$part2 = explode($closer,$part1[1]);
$result = $part2[0];
}
$string = '<dataset><title>title</title><content>lol content</content></dataset>';
$title = find($string,"<title>","</title>");
echo ("Title: $title");
?>