Im not to familiar with php.
I am posting from a form and my php looks like this :
// Object syntax looks better and is easier to use than arrays to me
$post = new stdClass;
// Usually there would be much more validation and filtering, but this
// will work for now.
foreach ($_POST as $key => $val)
$post->$key = trim(strip_tags($_POST[$key]));
On the form I have fields like Fist Name, Last Name , Address, Zip, City, State etc.
The information will displayed in a table on my next page (for example) with:
<?php echo $post->name; ?>
since I am using the object syntax.
If I want the cell that displays the address to combine the full address do I write it like this:
<?php echo $post->address, city, state, zip; ?>
I basically would like to show the address as an address would normally be displayed (e.g. 123 This street, City, AZ, 55555)
Ideally, it would be comma separated as an address would be written. So I am sure I am not do this correctly right now.
Try this:
The curly braces allow you to enclose PHP object references within a string (rather than having to use concatenation).