Hi, Cant work this out: foreach($SystemSettings as $var => $val) { if($row[1] == "home_title") { $pos = strpos($row[1], "{setting.$var}"); if ($pos === false) { echo "The string '{setting.$var}' was not found in the string '".$row[3]."'"; } else { echo "The string '{setting.$var}' was found in the string '".$row[3]."'"; } echo "<br />"; } } PHP: Thank you!
Here is some help perhaps $string = "PHP"; $container = "I love writing PHP code."; if(strstr($container,$string)) { echo "found it."; } else { echo "not found."; } PHP:
$pos = strpos($row[1], "{setting.$var}"); PHP: should be $pos = strpos($row[3], "{setting.$var}"); PHP:
Any chance the tokens are from a Smarty template? By the way strpos will never match if the encapsulating if block already determined $row[1] is "home_title"