Jump to content

Recommended Posts

Huh? No

 

Give us an example of the entire contents of $a

 

where $a = '123456789101112131415'

or

$a = an array of the values

 

once we know how the data is manufactured, we can tell you what you can use to work with it and pull out those values

Link to comment
https://forums.phpfreaks.com/topic/70621-how-to-store-a-value/#findComment-354902
Share on other sites

this is my code and i am find my $a value from my database

 

<? $sql2="select * from tbl_cat where sub_cat_id='$a' ";

$res2=mysql_query($sql2,$link);//$query=mysql_fetch_row($res);

$COLS_PER_ROW = 2;

$colCount = 0;

$numRows = mysql_num_rows ($res2);

while ($row2=mysql_fetch_array($res2))

{

  // Start a row whenever our count is divisible by the number of items in each row

  if ($colCount % $COLS_PER_ROW == 0)

  {

      echo "<tr>";

  }

  echo "<td><td><td><td><a href='test.php?sub_cat_id=$row2[id] 'class=bluelinkfont  >$row2[cat_name]</a></td></td></td></td>";

  // End the row when the last space in the row has been filled, or when there are no more items in the result set.

 

  if ($colCount % $COLS_PER_ROW == $COLS_PER_ROW - 1 || $colCount == $numRows - 1)

  {

      echo "</tr>";

  }

  $colCount++;

}

echo"<br><tr><tr>";

 

 

 

?>

Link to comment
https://forums.phpfreaks.com/topic/70621-how-to-store-a-value/#findComment-354911
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.