php - Find last character in multi-dimensional associative array and delete it -


i have associative array in foreach this:

foreach ($marray $avalue) {  foreach ($avalue $key => $value) {  echo $html->find($key,$value)  } } 

it gives me output:

bobby johnny 

now last character y did:

echo substr($thestring, -1); 

but gives me: yy because multi-dimensional array gives me last characters in each array. can last character on page y (..and delete it)?

$last_char = ''; foreach ($marray $avalue) {         foreach ($avalue $key => $value) {              if(substr($html->find($key,$value), -1) == 'y'){                  $last_char = $html->find($key,$value);             }          }     }    echo $last_char; 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -