Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
$str1="напред,назад,нагоре,надолу"; //Така трябва да е синтакса
$str="напред,назад,нагоре,надолу"; //Това дефакто е самият стринг
$newstr1=explode(",", $str1);
$num1=count($newstr1);
$newstr=explode(",", $str);
for($i=0; $i<=$num1; $i++)
{
if ($newstr1[$i] == $newstr[$i])
{
$ans[$i]="1";
}
else
{
$ans[$i]="0";
}
if (in_array("0", $ans))
{
$answer="Синтакса не е еднакъв !";
}
else
{
$answer="Всичко е ок !";
}
}
echo $answer;
?>