Hello
I am pulling my hair out on this one, I am wondering if its wamp server 5 or its just me. I want to know why this statment wouldn't work.
<a href="<?php echo 'some address'; ?>" >Address</a>
The link appears but appears something like this -- http://localhost/some_path/<?php echo 'some address'; ?>
instead of -- http://localhost/some_path/some address
Thanks.
Html and the echo statement
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Html and the echo statement
Will 'some address' be a variable or a string?
The above would output as Address with the link being "some address".
Code: Select all
<a href="<?php echo 'some address'; ?>" >Address</a>Re: Html and the echo statement
Its just a string, but i might want to use variables or even return values from functions.
Re: Html and the echo statement
Just checking, but:
- Do you definately have php installed?
- Is the page you are building saved with .php file extension?
- Do you definately have php installed?
- Is the page you are building saved with .php file extension?
Re: Html and the echo statement
Yeah I do
. I have found the problem, I was trying to run code written for php 3.
Thanks alot guyz.
Thanks alot guyz.