how can i use if statemend with strings in php?
and example is the following code:
<?php
$url = $_GET['url'];
$length = strlen($url);
$url = explode('/', $url);
print_r($url);
echo "<BR>";
if($length >= 0){
echo "URL excits";
}
if($url[0] = 'home'){
echo $url[0];
}
but whenever i pass a parameter in the url, it displays home.. what is wrong?
i spent almost a year now without using php so i really nred your help. thanks for anyone who will try to help me.. :)