How to Get the Values of Member in PHP-XML

\[code\]<office:Orlando> <credit role="CEO">John Smith</credit> <credit role="COO">Micheal Smith</credit> <credit role="Member">Ross</credit> <credit role="Member">Robert</credit> <credit role="Member">Liriana</credit> <credit role="Member">Davidson</credit></office><office:Miami> <credit role="CEO">Steve</credit> <credit role="Member">Shaun</credit> <credit role="Member">Michelle</credit> <credit role="Member">Kasper</credit></office>\[/code\]i want only first two members (Ross, Robert) (Shaun, Michelle) in PHPThis the xml format of a feed, i want to get the values of members\[code\]$credit = $office->credit;$creditcount = count($credit); $new_array = array(); for($i=0; $i<$creditcount; $i++){ $new_array[$i] = $credit[$i]; $arraystring = implode(', ', array_values($new_array)); }\[/code\]I'm getting all the values but how to identify them based on rolesPlease help
 
Back
Top