Is there a simple way to extract 2 variables from a string where one variable includes the odd character positions and another variable includes the even character positions?
$input="abcdef";
$oddoutput should be "bdf" (positions 1,3,5)
$evenoutput should be "ace" (positions 0,2,4)
This example assumes the first position in a string is zero and zero is considered an even number.
- - picklefish - -
$input="abcdef";
$oddoutput should be "bdf" (positions 1,3,5)
$evenoutput should be "ace" (positions 0,2,4)
This example assumes the first position in a string is zero and zero is considered an even number.
- - picklefish - -