SyntaxFix
Write A Post
Hire A Developer
Questions
PHP arrays have internal pointers, so try this:
foreach($array as $key => $value){ $index = current($array); }
Works okay for me (only very preliminarily tested though).