I don't know what wrong with the script

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
meir4u
Forum Newbie
Posts: 2
Joined: Sat Feb 13, 2010 12:50 pm

I don't know what wrong with the script

Post by meir4u »

Hi,

everything was ok and suddenly I had this error in my web site : Parse error: syntax error, unexpected T_STRING.... on line 19

this is the code

Code: Select all

<table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
 
<tr>
 
    <td align="center" class="tretr">1234567</td>
 
</tr>
 
<tr>
 
    <td></td>
 
</tr>
 
<tr>
 
    <td width="100%">
 
 
 
    </td>
 
</tr>
 
</table>
 
 
 
<?php $n="3";?>
 
<?php $sort_order="vertical";?>
 
<?php $colstart="";?>
 
<?php $colend="";?>
 
<?php $rowstart="<div class="rowleft">";?>   (this the line that show problem)
 
<?php $rowend="</div>";?>
 
<div id="catlist">
 
        <?php $rows=0;if(!isset($sort_order)){$sort_order='vertical';}if(!isset($n)){$n='2';}if($sort_order=='vertical'){$nr= ceil(bx_db_num_rows($title_query)/$n);} while($result_title=bx_db_fetch_array($title_query)) { if($rows==0){echo $colstart;if($sort_order=='vertical'){ echo $rowstart;}}elseif($sort_order=='horizontal' && $rows%$n==0){echo $colend.$colstart;}elseif($sort_order=='vertical' && $rows==$nr){echo $rowend.$rowstart; $rows=0;} $rows++;if($sort_order=='horizontal'){ echo $rowstart;}$hasSubcat=false;if(USE_JOB_SUBCATEGORY=='yes'){
 
                    $subcat_query=bx_db_query("SELECT jobsubcategoryid,jobsubcategory FROM ".$bx_table_prefix."_jobsubcategories_".$bx_table_lng." WHERE jobcategoryid='".$result_title['jobcategoryid']."'");
 
                    SQL_CHECK(0,__FILE__.':'.(__LINE__-1));
 
                    if (bx_db_num_rows($subcat_query)>0){$hasSubcat=true;}}?>
 
        <a href="<?php echo bx_make_url(bx_make_url_category($result_title['jobcategory'],$result_title['jobcategoryid']), 'auth_sess', $bx_session);?>"><?php echo $result_title['jobcategory'];?> </a><br />
 
        <?php if(USE_JOB_SUBCATEGORY=='yes'){while ($subcat_result=bx_db_fetch_array($subcat_query)){?>
 
        <span style="padding-left: 15px;"><a href="<?php echo bx_make_url(bx_make_url_category($result_title['jobcategory'],$result_title['jobcategoryid'].'-'.$subcat_result['jobsubcategoryid'],$subcat_result['jobsubcategory']), 'auth_sess', $bx_session);?>"><?php echo $subcat_result['jobsubcategory'];?></a></span><br />
 
        <?php } }?>
 
        <?php if($sort_order=='horizontal'){ echo $rowend;} }  if($sort_order=='horizontal' && $rows%$n!=0){while ($rows%$n != 0) {echo $rowstart.$rowend;$rows++;}} if($sort_order=='vertical'){ echo $rowend;} echo $colend;?>
 
</div>
can somebody tell me help me?
User avatar
a.heresey
Forum Commoner
Posts: 59
Joined: Wed Dec 13, 2006 7:31 pm
Location: Chesapeake, VA, US

Re: I don't know what wrong with the script

Post by a.heresey »

you need to escape the quotes try

Code: Select all

<?php $rowstart="<div class=\"rowleft\">";?>  
meir4u
Forum Newbie
Posts: 2
Joined: Sat Feb 13, 2010 12:50 pm

Re: I don't know what wrong with the script

Post by meir4u »

thanks! it helped :D
Post Reply