How can I assign the value 1990 to born_year in $u0? I get an error massage saying Invalid text string.
<?php if($u0->i_sex=='98') { ?>
$u0->born_year =1990;
<?php } ?>
How can I assign the value 1990 to born_year in $u0? I get an error massage saying Invalid text string.
<?php if($u0->i_sex=='98') { ?>
$u0->born_year =1990;
<?php } ?>
All PHP inside the " <?php ?>" tag
<?php
if($u0->i_sex=='98') {
$u0->born_year =1990;
}
?>
You are using PHP outside of the PHP tags.
<?php
is used at the start of your PHP code.?>
is used at the end of your PHP code.Try:
<?php
if($u0->i_sex=='98') {
$u0->born_year =1990;
}
?>