PHP String Encoding Error

Posted by Brian on Stack Overflow See other posts from Stack Overflow or by Brian
Published on 2010-05-24T20:52:40Z Indexed on 2010/05/24 21:01 UTC
Read the original article Hit count: 251

Filed under:
|
|

I'm trying to get the following code to output an IMG tag with the URL for Google Static Maps API http://code.google.com/apis/maps/documentation/staticmaps/#Imagesizes embedded in there... the result is that everything except the $address is being output successfully... what am I doing wrong?

function event_map_img($echo = true){
    global $post;
    $address = get_post_meta($post->ID, 'date_address', true);
    if($echo): echo '<img src="'.'http://maps.google.com/maps/api/staticmap?center='.$address.'&zoom=14&size=700x512&maptype=roadmap&markers=color:blue|label:X|'.$address.'&sensor=false" />';
    else:
        return '<img src="'.'http://maps.google.com/maps/api/staticmap?center='.$address.'&zoom=14&size=700x512&maptype=roadmap&markers=color:blue|label:X|'.$address.'&sensor=false" />';
    endif;
}

© Stack Overflow or respective owner

Related posts about php

Related posts about string