i know what i have got is completly wrong...obvious coz it doesn't work. what i want to do is search $product_info['model_maker'] for something the same, i can't make it equals because sometimes the $product_info['model_maker'] might be Dreamtime Cruiser 4x4, so i want it to just get the dreamtime and return my echo.
i realise it is not stristr, but don't know what to put here. any help would be great. thankyou
<?php
$string = $product_info['model_maker'];
if (stristr($string, 'magnifique') === TRUE) {
$magnifique = "tPath=4_8";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $magnifique) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'sapphire') === TRUE) {
$sapphire = "tPath=4_7";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $sapphire) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'daintree') === TRUE) {
$daintree = "tPath=4_5";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $daintree) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'dreamtime') === TRUE) {
$dreamtime = "tPath=4_6";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $dreamtime) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'vacationer') === TRUE) {
$vacationer = "tPath=4_10";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $vacationer) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'retreat') === TRUE) {
$retreat = "tPath=4_9";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $retreat) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'aurora') === TRUE) {
$aurora = "tPath=13_17";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $aurora) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'sapphire') === TRUE) {
$compact = "tPath=13_18";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $sapphire) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'gts') === TRUE) {
$gts = "tPath=13_15";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $gts) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'nautilus') === TRUE) {
$nautilus = "tPath=13_14";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $nautilus) . '"><img border="0" src="images/specs.png"></a>';
}
elseif (stristr($string, 'sextant') === TRUE) {
$sextant = "tPath=13_16";
echo ' ' . '<a onMouseover="show_text(3,\'div1\')" onMouseout="resetit(\'div1\')" href="' . tep_href_link(FILENAME_ARTICLES, $sextant) . '"><img border="0" src="images/specs.png"></a>';
}
else {'11'; }?>
Changed
tags to [code=php] tags -- NogDog[/color][/i]