This works:
Welcome <?php echo $_GET["name"]; ?><br>
But this doesn't:
'html' => 'Hello $_GET["name"];',
How should I code this?
This works:
Welcome <?php echo $_GET["name"]; ?><br>
But this doesn't:
'html' => 'Hello $_GET["name"];',
How should I code this?
it should be echo "Hello $_GET['name']";
, single quotes show exact values, you can use double quotes if you are using variables.
echo "Hello {$_GET["name"]}";
This should do.
Correction:
Its not a good practice to use double quotes inside double quotes as pointed out in comments. So the correct thing should be Hello {$_GET['name']}