Jump to content

cla

New Members
  • Posts

    6
  • Joined

  • Last visited

cla's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. For that we have to use the regex expressions .. thanks alot
  2. Hi, just to calrify me, what I mind is: in this case $image is the array taht contain n variable Array ( [0] => post_id [1] => title [2] => content [3] => image [4] => url [5] => url_openblank and the variable 'image' inside the array $image is a string composet with all the attribute of the image ["image"]=> string(166) "<img width="570" height="570" src="http://wordpressfresh:8888/wp-content/uploads/2014/05/anteprima-03.jpg" class="attachment-full wp-post-image" alt="anteprima-03" />" rigth? best regards claudio
  3. Hi, yes image is a string so is a normal array.. and the regex expression is the rigth way thank yuo all !! Claudio
  4. Hi, yes is a multidimensional array.. i get this: array(6) { ["post_id"]=> int(44) ["title"]=> string( "titolo 1" ["content"]=> string(11) "excerpt uno" ["image"]=> string(166) "<img width="570" height="570" src="http://wordpressfresh:8888/wp-content/uploads/2014/05/anteprima-03.jpg" class="attachment-full wp-post-image" alt="anteprima-03" />" ["url"]=> string(0) "" ["url_openblank"]=> bool(false) } do you think is possible get the specific value of the src inside the string?
  5. Hi Adam, thanks for the replay but this not work for me.. i get an empty echo <?php echo " >> " , $image['url'] , " < .. empty"; ?> print : >> < .. empty But I need the src value inside the image [4] value and not the url [5] I think the image [4] is another array, If I call it <?php echo $image['image'] ?> I get the image tag with all attribute <img width="570" height="570" src="http://wordpressfres...nteprima-03.jpg" class="attachment-full wp-post-image" alt="anteprima-03" /> and if I call this <?php echo $image['image'][0] ?> or other index number I get the < for 0, i for 1, m for 2 an so on.. I think there is a way to get the src value but my php is like my english Claudio
  6. Hi, i'm new here, and i need modify some php code but i'm not able to do.. maybe is a stupid question i think this is a multidimensional array <?php print_r(array_keys($image)); ?> print: Array ( [0] => post_id [1] => title [2] => content [3] => image [4] => url [5] => url_openblank ) <?php echo $image['image'] ?> echo me the images with all attribute <img width="570" height="570" src="http://wordpressfresh:8888/wp-content/uploads/2014/05/anteprima-03.jpg" class="attachment-full wp-post-image" alt="anteprima-03" /> what I need is only the src value, how can I get it? thanks in advance claudio
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.