<?php $str = "abcdefghijklmn"; $arr= str_split($str); $nstr=""; foreach($arr as $k=>$v) { if($k%2!=0){ $nstr.= $v; } } echo strrev($nstr); //"prints" nljhfdb
You have javascript disabled. You will not be able to edit any code.