字符串翻转
<?php
$s = 'strlen,substr,count';
$o = '';
$i = 0;
while(isset($s[$i]) && $s[$i] != null) {
$o = $s[$i++].$o;
}
echo $o;
?>
将单词 翻转
<?php
$s = 'strlen substr count';
$o = '';
$i = 0;
while($s[$i]) {
$o = $s[$i++].$o;
}
echo $o;
字符串翻转
<?php
$s = 'strlen,substr,count';
$o = '';
$i = 0;
while(isset($s[$i]) && $s[$i] != null) {
$o = $s[$i++].$o;
}
echo $o;
?>
将单词 翻转
<?php
$s = 'strlen substr count';
$o = '';
$i = 0;
while($s[$i]) {
$o = $s[$i++].$o;
}
echo $o;