Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

General Discussions


You are currently viewing our General Discussions as a guest. Please register to participate.
Login



Reply
Old 07-07-2006, 12:41 PM I need a scrippet
RedMatrix
Guest

Posts: n/a
Trades:
PHP code snippet, that is. :taz:


I want to be able to have a form with 3 string inputs,
then put them into an array for storage,
and then use the parts of the array in HTML output.

I think I know some basics, such as:

$variable = array ('aaa','bbb','ccc');

But how to get it to output this:

<a href="aaa" alt="bbb">ccc</a>

? Thats what I can't find on google searching for php arrays. I've been at it a waking day now. ARgh.

Someone please point me in the right direction, and then kick me in the *** so that I can get there faster.

thanks.
Reply With Quote
 
 
Register now for full access!
Old 07-07-2006, 01:17 PM
Junior Talker

Posts: 14
Trades: 0
http://uk.php.net/array

That might help. The PHP site is the place to look for any PHP help, especially with specific functions.

Edit: I'll try to throw something together for you quickly in a while, I'm just going out to get a Chinese, so I'll give it a go when I get back.
hairyfreak is offline
Reply With Quote
View Public Profile Visit hairyfreak's homepage!
 
Old 07-07-2006, 03:55 PM
RedMatrix
Guest

Posts: n/a
Trades:
Thanks for the link. Hit me up on msn if you got it.
bigredskype [@hotmail] is my s/n.
Reply With Quote
 
Old 07-07-2006, 03:58 PM
$1,000 - $4,999 Monthly

Posts: 52
Trades: 0
Quote:
Originally Posted by RedMatrix View Post
PHP code snippet, that is. :taz:


I want to be able to have a form with 3 string inputs,
then put them into an array for storage,
and then use the parts of the array in HTML output.

I think I know some basics, such as:

$variable = array ('aaa','bbb','ccc');

But how to get it to output this:

<a href="aaa" alt="bbb">ccc</a>

? Thats what I can't find on google searching for php arrays. I've been at it a waking day now. ARgh.

Someone please point me in the right direction, and then kick me in the *** so that I can get there faster.

thanks.

The out put would be in:

$variable[0]; <--- aaa
$variable[1]; <--- bbb
$variable[2]; <--- ccc
clenard is offline
Reply With Quote
View Public Profile
 
Old 07-07-2006, 04:09 PM
ForgottenCreature
Guest

Posts: n/a
Trades:
If you can't get it from what was just said, here ya go.

PHP Code:
$variable = array ('aaa','bbb','ccc');
echo 
"<a href='$variable[0]' alt='$variable[1]'>$variable[2]</a>"
Reply With Quote
 
Old 07-07-2006, 04:13 PM
$1,000 - $4,999 Monthly

Posts: 52
Trades: 0
Quote:
Originally Posted by ForgottenCreature View Post
If you can't get it from what was just said, here ya go.

PHP Code:
$variable = array ('aaa','bbb','ccc');
echo 
"<a href='$variable[0]' alt='$variable[1]'>$variable[2]</a>"
Yeah, I guess I should have given a little more... just figured people learn from figuring it out on their own, as I did. :tooth:
clenard is offline
Reply With Quote
View Public Profile
 
Old 07-07-2006, 08:03 PM
Junior Talker

Posts: 14
Trades: 0
My MSN address is hairyfreak@hotmail.co.uk if you would like to add me. I've had a lot of experience with PHP, so I should be able to help
__________________

Please login or register to view this content. Registration is FREE
hairyfreak is offline
Reply With Quote
View Public Profile Visit hairyfreak's homepage!
 
Reply     « Reply to I need a scrippet
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.21214 seconds with 12 queries