Solution:1
$string = 'zeeshan';
$reverse = '';
$i = 0;
while(!empty($string[$i])){
$reverse = $string[$i].$reverse;
$i++;
}
echo $reverse;
Solution:1
$string = 'zeeshan';
$reverse = '';
$i = 0;
while(!empty($string[$i])){
$reverse = $string[$i].$reverse;
$i++;
}
echo $reverse;
Solution:2
$string = "ZEESHAN";
$j = 0;
while(!empty($string[$j])) {
$j++;
}
for($i = ($j-1); $i >= 0; $i--) {
echo $string[$i];
}
Solution:3
$string = "ZEESHAN";
$reverse = "";
$j = 0;
while(isset($string[$j])){
$j++;
}
for($i = $j - 1; $i >= 0; $i--){
$reverse .= $string[$i];
}
echo $reverse;