arrays - How to extract number from string -


my array contains string :

eth1 eth12 eth20 eth35 eth5 

i want array contains number of these string :

1 12 20 35 5 

i tried trimend() function, don't know how specify this...

thanks

this way

$mynewarray = $myarray  -replace 'eth'  

if text not 'eth'

$mynewarray = $myarray -replace '\d'  

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -