PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am working on my site and adding the ability for users to like different pages and I would like to be able to keep track of the number of likes each website url has and insert them into my database. So far it works fine for if I want to submit one url to check but I would like to set it up as a cron job to check multiple url's using a function. The problem that has me stumped is how do I take the "http://www.test.com" out of 'query' => 'select total_count from link_stat where url = "http://www.test.com";' and replace it with a variable. Every method I have tried has failed and i'm not sure if it has something to do with facebooks php sdk or not. Any help would be very much appreciated. Chance
No that's not it I'm afraid. I understand string concatenation but if that were the case I could just do something like this (which isn't concatenation but it wouldn't need to be) I think its something with fb's php sdk cause if I do this I get the following error.
Fatal error: Uncaught Exception: 601: Parser error: unexpected '$' at position 51. thrown in C:\Documents and Settings\Chance\Desktop\New Site\xampplite\htdocs\facebook.php on line 515
I can post the facebook.php file if you want to look. Is there some way I can make a variable inside the array or something? Can array statements have variables in them?