I need help with the following error

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!

Moderator: General Moderators

Post Reply
BrentK
Forum Newbie
Posts: 1
Joined: Sun Jul 11, 2010 9:43 pm

I need help with the following error

Post by BrentK »

I am looking for some help with the following error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /home/content/k/u/c/kucharskiba/html/wp-content/themes/JobPress 2/functions-sub.php on line 1882

Here is the code from line 1882:

Code: Select all

echo '<th class="'.($n%2==0?'alternate':'').' check-column" valign="top" style="font-size:11px;"><input  type="checkbox" name="post[]" value="'.$post_arr[$n]->ID.'" style="width:14px; height:14px;" /></th>';
I am new to coding and looking for some help.

Thank you in advance.

Brent
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Re: I need help with the following error

Post by Burrito »

at first glance, that line looks fine to me.

try just echoing $post_arr[$n]->ID

and see what you get.
TechZi
Forum Newbie
Posts: 1
Joined: Sun Jul 11, 2010 10:34 pm

Re: I need help with the following error

Post by TechZi »

please make sure $post_arr[$n]->ID that it is no empty. check it with var_dump($post_arr[$n]);
Post Reply