0

hello i have a little bit problem i am working on php4 and apache 1.1

<?php
$something="first second";
echo '<input type="checkbox" name="standard[]" value='.$something.'>first second<br>';
?>

Result:

first

and if

<?php
    echo '<input type="checkbox" name="standard[]" value="first second">first second<br>';
    ?>

Result:

first second

i want my code is like the first one but the result is in second one, how? thanks

1 Answers1

0

do something like that

echo '<input type="checkbox" name="standard[]" value="'.$something.'">'.$something.'<br>';

one way to debugg such things is to check what is their output like view on source or inspect elements

What is the difference between single-quoted and double-quoted strings in PHP? about ' and "

Community
  • 1
  • 1
M.chaudhry
  • 651
  • 1
  • 6
  • 13