Quote:
Originally Posted by bimbocams
I want the keyword in the beginning followed by models name
|
You can use the following PHP code:
Code:
$keywords = array('my keyword', 'my keyword 2', 'my keyword 3');
$post['post_title'] = $keywords[rand(0, count($keywords) - 1)] . ' ' . $post['post_title'];
If your keywords are stored as a text file (one keyword per line), you can use it like this:
Code:
$keywords = file('http://www.mysite.com/keywordlist.txt');
$post['post_title'] = $keywords[rand(0, count($keywords) - 1)] . ' ' . $post['post_title'];
Just make sure to replace http://www.mysite.com/keywordlist.txt with the actual URL of your text file.