in the string XX is always changed and string can be longer or shorter and it can be without searched word, where XX is a number example:
1 kom. nije naručeno, obično dolazi za 5 dana., slični: sony-6am6ptb1a (0 kom.), sony-s006pb1a (-9 kom.)
So from that I need to output just: obično dolazi za 5 dana
So how can I chose just &find in any case?
my example that does not work:
foreach(int intIndex = 1; intIndex <= 31; intIndex++)
{
$find_kad = "obično dolazi za " . strval(intIndex) . " dana."
$find_kad_eng = "usually comes in " . strval(intIndex) . " days."
if (strpos($availability,$find_kad) !== false)
{
//echo '$string contains $find';
$dostupno_je="Po narudžbi ".$find_kad;
$dostupno_je_eng="On order it ".$find_kad_eng;
mysql_query("UPDATE ps_stock_available SET out_of_stock=1 WHERE id_product = $ztoro_id_product");
mysql_query("UPDATE ps_product_lang SET available_later="$dostupno_je" WHERE id_product = $ztoro_id_product AND id_lang=1");
mysql_query("UPDATE ps_product_lang SET available_later="$dostupno_je_eng" WHERE id_product = $ztoro_id_product AND id_lang=6");
}
else{
// just write not avaiable
$find_kad= "NIJE DOSTUPNO":
}
}
I get error on frist line:
Parse error: syntax error, unexpected T_STRING in script.php on line 618