Any help would be greatly appreciated. I'm a total php noob. What I want to do is change the following code:
Need Some Simple PHP Help Please
5
Any help would be greatly appreciated. I'm a total php noob.
What I want to do is change the following code:
Specifically the $title part.
I want it to be able to post titles from a list of titles either sequentially or randomly.
I was going to use something like this:
But I didn't know if it would work inside the function section. I'd prefer it to just pull titles sequentially but if random is easier that's fine too.
What I want to do is change the following code:
Code:
function syn_syndicate_box() {
global $syn_multi_curl;
$syn_multi_curl = new MultiCurl();
$options = syn_get_admin_options();
$post = wp_get_single_post( $_GET[ 'post_id' ] );
$title = $post->post_title; I want it to be able to post titles from a list of titles either sequentially or randomly.
I was going to use something like this:
Code:
$title[0] = "beginners php"; $title[1] = "random title example"; $title[2] = "quite neat i suppose"; $title[3] = "useful , probably not"; $title[4] = "oh well"; // get a random number $randomize = rand(0, 4); echo ($title[$randomize]);
- martinkeens
- -Jericho-
- martinkeens
- [ 1 ] Thanks
- WarriorForSuccess
Next Topics on Trending Feed
-
5