How to remove colon within array string in php -


y foreach loop like

foreach($set $messaccesstoken => $mertid){ 

the loop gives me array

array ([1] => m_mid.1423282844838:1d2ec85ca015107784[2] => m_mid.1390680182411:d4ca154850b82d1931 [3] => m_id.199186660280356 ) 

the third element different foreach loop stop want skip third element , jump element continue loop

i have many array element except when find m_id.199186660280356 foreach loop stop execution because array string m_mid.1423282844838:1d2ec85ca015107784 when find structure m_id.199186660280356 loop stop want use if loop when find colon in array element loop continue how can done in php. can me? thanks

well, unable see foreach loop in brain since not in post, can find string in string using strpos (among other ways). since have no code try , modify, can see logic on how strpos works , inherit in code (that can't see because it's secret, shhh) ::

foreach( $array &$value ) {     if( strpos($value, ':' ) ) {         return;     } } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -