drupal - Problems with PHP explode -


i'm using code:

$imageurl = "http://siteadress/sites/default/files/bjorn_4.jpg"; $pieces = explode('/', $imageurl); print_r($pieces); 

to split url.

the print_r gives me result =

array ( [0] => http://siteadress/sites/default/files/bjorn_4.jpg ) 

shouldn't split url after each /? array ( [0] => http:/ [1] => / [2] => siteadresses or that?

i think should try :

$imageurl = [node:field_banner_image]; 

because quotes explode think string [node:field_banner_image] , not string inside.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -