Jump to content

Newb question i think


Brian W

Recommended Posts

if i have $Value1 = "hello"; $Value2 = "world"; $Value3 = "HI"

and I want to combine the two three $helloworld = HI

how could I do that?

 

I'm sorry I don't understand this question.  The '.' is a concatenation string.  So when you write

$Value1 .= $Value2;

 

It's the same thing as:

 

$Value1 = $Value1 ."". $Value2;

 

If this doesn't help please just tell me the three vars and what final result you want.

Link to comment
Share on other sites

The variables are from a data base. I'm trying to populate certain cell (out of a 50x50 cell table). If $row_pos['left'] = "4" and $row_pos['top'] = "3", and $row_pos['word'] = "HI"

I want it to come out as $cell4x3 = "HI"

in my table in the cell 4 over and 3 down, there is

echo $cell4x3

Link to comment
Share on other sites

Sorry, i'm making a game board that has 40 x 40 cells. Each cell was going to have a string (such as 2 across and 1 down would have $x3y1)

Players would add entries into the database with a picture's source from a list I have (20x20px pics) and x and y positioning choices. I then have a repeat field that takes the info from the database and converts it into the image script in the right place.

 

$x3y1 = "<img src=\"$row_pos['src']\" > \\ or something like that.

 

I changed over to a repeating background of chess board like squares to create my board (less script, better refresh time) and set it up to have absolute positioning instead. (tid bit from it: absolute; left; ".10+(20*$row_pos['X'])."...(*20 because each square is 20pixels and + 10 because the screen margins 10 from the top and left.))

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.