|
-
Jul 10th, 2008, 02:08 PM
#1
Thread Starter
Hyperactive Member
create hyperlink with variable in it
Hello, how can I make php display a hyperlink with a variable in it? Pretty much I want to define
$str_folder = "test"
$str_file="filename"
Then display the hyperlink as:
http://www.website.com/uploads/{test}/{filename}
Last edited by LostAngel; Jul 10th, 2008 at 03:18 PM.
Code:
If LostAngel.Tag = "Programming" then
LostAngel.Caption = "Awake"
Else
LostAngel.Caption = "Dreaming of Code"
End If
-
Jul 10th, 2008, 04:04 PM
#2
Re: create hyperlink with variable in it
Some simple concatenation?
PHP Code:
<?php
$str_folder = "test";
$str_file = "filename";
?>
<a href="http://www.website.com/uploads/<?php print $str_folder . '/' . $str_file; ?>>Link</a>
-
Jul 11th, 2008, 07:05 AM
#3
Thread Starter
Hyperactive Member
Re: create hyperlink with variable in it
 Originally Posted by nmadd
Some simple concatenation?
PHP Code:
<?php
$str_folder = "test";
$str_file = "filename";
?>
<a href="http://www.website.com/uploads/<?php print $str_folder . '/' . $str_file; ?>>Link</a>
Fantastic! Thanks.
Code:
If LostAngel.Tag = "Programming" then
LostAngel.Caption = "Awake"
Else
LostAngel.Caption = "Dreaming of Code"
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|