$string = array('A','B','C','A','B','C');
For example first instance of C in $string would be 2
Is there a simpler way to do this than doing a complex loop in php?
$string = array('A','B','C','A','B','C');
For example first instance of C in $string would be 2
Is there a simpler way to do this than doing a complex loop in php?
Use array_search()
function. (http://php.net/array_search)