/ Published in: PHP
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function get_image_src($posti = null) {
if (!$posti)
global $post;
else
$post->post_content = $posti;
$the_content = $post->post_content;
$pattern = '!<img.*?src="(.*?)"!';
$image_src = $matches['1'][0];
return $image_src;
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                