Alright, I'm newish to php, I've done some echoing in my short time, to general success, but now I'm completely baffled and can't seem to the find the answer or correct syntax for what i'm trying to do.
I am replacing text in a string... er, or trying to, but the text I'm trying to replace has multiple quotes in it. The back story is that I'm running word press, which is syndicating a bunch of rss feeds into it's feed. This all works fine, except for google news feeds. Apparently google news feeds, when then don't have an image still carry an img tag, it's just 1px x 1px and has no src data.
So I've got the install set to create thumbnails of the first photo in each post, which works great until it hits this img tag and creates a thumbnail of the non-image.
My options seem to be to find a way to have it ignore this one type of tag, OR replace the tag in the database with an empty space. The later option seems easier, since it should just be a replace string. I want to put it in the footer php and then it runs it every time the page is visited so I don't have to. i figure it's so specific a tag that this should be fine.
So here is my replace strong where i'm getting the error, i've tried multiple variations on the quotation marks and escaping the quotes, but i keep getting a T_String parse error....:
<?php
$con = mysql_connect('server','igarrett','pass');
mysql_select_db('dbnamet', $con);
UPDATE wp_posts SET post_content = replace('post_content','<img alt="" height="1" width="1">',' ');
mysql_close($con)
?>
thoughts? THANKS!