Jump to content

[SOLVED] Parse Error


40esp

Recommended Posts

Im getting the: Parse error: syntax error, unexpected T_IF in /var/www/jaikobcreate/sw/dev/admin/edit_signup.php on line 155 Error.

 

Line 155 is:

<?php $check_if = if(strstr($is_subscribed, "[$key]")) { "checked=\"checked\""; } ?>

 

Here is the whole chunk of code:

<?php
$is_subscribed = $row_email_record['practice_groups'];
$check_if = if(strstr($is_subscribed, "[$key]")) { "checked=\"checked\""; }
foreach($newsletter as $key=>$title)
{
  echo "<input type=\"checkbox\" name=\"select\" id=\"select\" value=\"$key\"".$check_if."/>";
}
?>

 

What did I miss?

Link to comment
https://forums.phpfreaks.com/topic/109481-solved-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.