User login
Unsystematic Affiliates
Change Language
Who's online
There are currently 0 users and 9 guests online.
Alxandr is right - in php 4, 5, & 6 you must put strings and chars inside a '' (single quote) if you want that value stored, or in a "" (double quote) if you want that value processed and then stored.
<?php
$field = "name";
$data = "We are making a string with a $field";
//Contents of $data: "We are making a string with a name";
$data2 = 'We are making a string with a $field';
//Contents of $data2: "We are making a string with a $field";
?>
See, when you use "" the string is checked for any variables.
Submitted by David on June 5, 2007 - 2:52pm.
Reply
Like what you see?
Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say.
Contact Us