strpos

selecting an array key based on partial string

Hello there, I have an array and in that array I have an array key that looks like, show_me_160 this array key may change a little, so sometimes the page may load and the array key maybe show_me_120, I want to now is possible to just string match the array key up until the last _ so that I can check what the value is after the last und...

PHP strpos(), echoing instances found

Using the strpos() function in PHP, how can I echo what strpos() has found? All items that it has found. Thanks ...

PHP substr after a certain char, a substr + strpos elegant solution?

Hello, let's say I want to return all chars after some needle char 'x' from: $source_str = "Tuex helo babe". Normally I would do this: if( ($x_pos = strpos($source_str, 'x')) !== FALSE ) $source_str = substr($source_str, $x_pos + 1); Do you know a better/smarter (more elegant way) to do this? Without using regexp that would no...