parse error help please

Parse error: syntax error, unexpected T_VARIABLE, expecting ‘,’ or ‘;’ in C:\application\views\messages\view_jobNotify.php on line 51

[php] <?php
if(isset($notifyData))
{

						  $i=1; $k=0; 
					     foreach($notifyData as $res)
						 {
							//pr($res);
							foreach($res as $rec)
							  { $i=$i+1; 
							  
							  if($i%2 == 0)
							    {
							    $class ="dt1 dt0";
								$class2 = "dt2";
								}
							  else
							    {
							    $class ="dt2 dt0";	
								$class2 = "dt1";
								}
								  $k=$k+1;
									?>
								  
								  <td class="<?php echo $class2; ?>"><?php echo $k; ?></td>
								  <td class="<?php echo $class2; ?>"><?php foreach($Users->result() as $user) { if($user->id == $rec->creator_id) { ?><a href="<?php echo site_url('owner/viewProfile/'.$user->id); ?>"> <?php  echo $user->user_name; ?></a><?php  } } ?></td>	
								  <td class="<?php echo $class2; ?>"><a href="<?php echo site_url('job/view/'.$rec->id); ?>" onclick="check1('<?php echo $k; ?>')" id="show<?php echo $k; ?>"><?php echo $rec->job_name; ?></a></td>
								  <td class="<?php echo $class2; ?>"><?php echo $currency. $rec->budget_min.' - '$currency. $rec->budget_max;?></td>
								  <td class="<?php echo $class2; ?>"><?php echo get_datetime($rec->created); ?></td>
								  <td class="<?php echo $class2; ?>"><?php if($rec->job_status == '0') echo '<b style="color:green;">'.'Open'.'</b>'; if($rec->job_status == '2') echo '<b style="color:red;">'.'Closed'.'</b>' ?><?php 
								  //Only for job Awards notification
								  if(!isset($invitation) and isset($awards) ) 
								  { ?>	      
								     <a href="<?php echo site_url('job/acceptJob/'.$rec->id.'/'.$rec->checkstamp); ?>"> <?php echo $this->lang->line('Accept'); ?></a>  
								     <a href="<?php echo site_url('job/denyJob/'.$rec->id.'/'.$rec->checkstamp); ?>"> <?php echo $this->lang->line('Denied'); ?></a> <?php
								  } ?>
								  
								 </td></tr>  <?php
								}  
							 } 
						   }else{
						   echo 'No Records Found';
						   }		
							?>	 	  [/php]

can you see the missing … ’ or missing ; ? many thanks

this code is line 50 and 51

[php]

<?php echo $rec->job_name; ?>
<?php echo $currency. $rec->budget_min.' - '$currency. $rec->budget_max;?>[/php]

Could it be in the site_url() function?

this is the function…

[php]function invitation()
{
//Update jobs
$projectId = $this->input->post(‘projectInviteData’);
$projectId = explode(’,’,$projectId);
foreach($projectId as $res)
{
$updateKey = array(‘job_invitation.id’=>$res);
}

	if(!isset($this->loggedInUser->id))
	  {
	  	$this->session->set_flashdata('flash_message', $this->common_model->flash_message('error',$this->lang->line('You can not access to this page')));
	    redirect('information');
	  }
	//language file - Change this file to do display text modification
	$this->lang->load('enduser/messages', $this->config->item('language_code'));
	
	//jobInvitation lists
	$invitation =  $this->input->post('projectInviteData');
	$invitation = explode(',',$invitation);
	$i = 0;
	foreach($invitation as $id)
	  {
		$condition = array('jobs.id'=>$id);
		$notifyData = $this->skills_model->getJobs($condition);
		$notifyDatas[$i++]  = $notifyData->result(); 
		
	  }
	$this->outputData['title']      =  'Job Invitation';
	$this->outputData['invitation'] =  'invitation';		
	$this->outputData['notifyData'] =  $notifyDatas; 
    $this->load->view('messages/view_jobNotify',$this->outputData);	
[/php]

any ideas? thanks Sean

That doesn’t say function site_url()?

SORRY… WILL LOOK AGAIN MANY THANKS!

JUST FOUND IT…

[php]function site_url($uri = ‘’)
{
if ($uri == ‘’)
{
return $this->slash_item(‘base_url’).$this->item(‘index_page’);
}

	if ($this->item('enable_query_strings') == FALSE)
	{
		$suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix');
		return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix;
	}
	else
	{
		return $this->slash_item('base_url').$this->item('index_page').'/'.$this->_uri_string($uri);
	}
}[/php]

I don’t see any parse errors there either. You should post the entire contents of view_jobNotify.php

Many thanks… its here!

[php]<?php $this->load->view('header'); ?>

<?php $this->load->view('sidebar'); ?>
                        <div class="clsInnerCommon">
                          <h2><?php echo $title; ?></h2>
					       <p style="padding-left:10px !important;"><b><?php echo $this->lang->line('User Name'); ?> : </b><?php echo $loggedInUser->user_name; ?></p>
						   <table>
	 					  	<tr>
						      <td width="10%" class="dt"><?php echo $this->lang->line('Sl.No'); ?></td>								  
							  <td width="20%" class="dt"><?php echo $this->lang->line('Creator Name'); ?></td>								  
							  <td width="20%" class="dt"><?php echo $this->lang->line('Job Name'); ?></td>
							  <td width="10%" class="dt"><?php echo $this->lang->line('Budget'); ?></td>
					          <td width="15%" class="dt"><?php echo $this->lang->line('Post Date'); ?></td>
						      <td width="10%" class="dt"><?php echo $this->lang->line('Status'); ?></td><?php 
							  if(!isset($invitation) and isset($awards) ) 
								  { ?>	
							 <!-- <td width="10%" class="dt">&nbsp;</td>--> <?php } ?>
							</tr>
							<tr>
					      <?php 
						  if(isset($notifyData)) 
						  { 
						 
						  $i=1; $k=0; 
					     foreach($notifyData as $res)
						 {
							//pr($res);
							foreach($res as $rec)
							  { $i=$i+1; 
							  
							  if($i%2 == 0)
							    {
							    $class ="dt1 dt0";
								$class2 = "dt2";
								}
							  else
							    {
							    $class ="dt2 dt0";	
								$class2 = "dt1";
								}
								  $k=$k+1;
									?>
								  
								  <td class="<?php echo $class2; ?>"><?php echo $k; ?></td>
								  <td class="<?php echo $class2; ?>"><?php foreach($Users->result() as $user) { if($user->id == $rec->creator_id) { ?><a href="<?php echo site_url('owner/viewProfile/'.$user->id); ?>"> <?php  echo $user->user_name; ?></a><?php  } } ?></td>	
								  <td class="<?php echo $class2; ?>"><a href="<?php echo site_url('job/view/'.$rec->id); ?>" onclick="check1('<?php echo $k; ?>')" id="show<?php echo $k; ?>"><?php echo $rec->job_name; ?></a></td>
								  <td class="<?php echo $class2; ?>"><?php echo $currency. $rec->budget_min.' - '$currency. $rec->budget_max;?></td>
								  <td class="<?php echo $class2; ?>"><?php echo get_datetime($rec->created); ?></td>
								  <td class="<?php echo $class2; ?>"><?php if($rec->job_status == '0') echo '<b style="color:green;">'.'Open'.'</b>'; if($rec->job_status == '2') echo '<b style="color:red;">'.'Closed'.'</b>' ?><?php 
								  //Only for job Awards notification
								  if(!isset($invitation) and isset($awards) ) 
								  { ?>	      
								     <a href="<?php echo site_url('job/acceptJob/'.$rec->id.'/'.$rec->checkstamp); ?>"> <?php echo $this->lang->line('Accept'); ?></a>  
								     <a href="<?php echo site_url('job/denyJob/'.$rec->id.'/'.$rec->checkstamp); ?>"> <?php echo $this->lang->line('Denied'); ?></a> <?php
								  } ?>
								  
								 </td></tr>  <?php
								}  
							 } 
						   }else{
						   echo 'No Records Found';
						   }		
							?>	 	  
						</table>
                        </div>
                     
  </div>
  <!--END OF POST JOB-->
</div> 
 <!--PAGING-->
  	<?php if(isset($pagination_inbox)) echo $pagination_inbox;?>
 <!--END OF PAGING-->
<?php $this->load->view('footer'); ?>[/php]

Ahh… it was in your original post and I totally missed it :frowning:

[php]

<?php echo $currency. $rec->budget_min.' - '$currency. $rec->budget_max;?>[/php]

Missing . before $currency

[php]

<?php echo $currency. $rec->budget_min.' - '.$currency. $rec->budget_max;?>[/php]

That’s it Matt SORTED :smiley: :smiley: :smiley:

MANY THANKS MATT…IT WAS DRIVING ME MAD!.. SEAN

Sponsor our Newsletter | Privacy Policy | Terms of Service