Jump to content


Photo

More than one value per variable


  • Please log in to reply
3 replies to this topic

#1 shortkid422

shortkid422
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 14 December 2003 - 03:27 AM

How can i insert more than one value per variable WITHOUT using arrays?
Need some php work thats cheap and reliable?[br]AIM shortmonkey422[br]MSN shortkid422@hotmail.com[br]Email: shortkid422@hotmail.com

#2 triphis

triphis
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts

Posted 15 December 2003 - 02:18 AM

umm, you cant... you can ADD to a variable...

$variable = \"I like\";
$variable .= \"pizza!\";

echo $variable;

would look like: I like pizza!


But no, you can\'t have more than one value per variable without usuing arrays
Xac Attack

#3 shortkid422

shortkid422
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 15 December 2003 - 02:01 PM

k, thanks i, i just didnt want to do 78 queries, which is what i did. I love copy and paste!
Need some php work thats cheap and reliable?[br]AIM shortmonkey422[br]MSN shortkid422@hotmail.com[br]Email: shortkid422@hotmail.com

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,016 posts

Posted 15 December 2003 - 07:28 PM

umm, you cant...


You can so long as you a means of separating them :-

Eg a colour value which has red, green and blue values in separate bytes

or

\"abc|def|ghi|jkl\" using a delimiter.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users