Jump to content

atbjk

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

atbjk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi, i am trying to give a function a unique name based on where it is called in the page. for example: i would call the function like so in a page called test.php lets say the line i call test is 20 test(); this is located in another file function.inc its lines are from 1-3 function test($temp=__LINE__){     echo $temp; } when test echos temp it would give me the line where __LINE__ appears(1). is there a way to find where a function is executed or how to give it a unique name or how to make __LINE__ dynamic??
  2. ok im trying to add some decimals together but when i add a decimal that equals a number like 10 or 20 it does not print the trailing zero. I not trying to echo this data, it does it in memory im using echo to show you, i dont know why it does this any help would be greatful Reproduce code: --------------- for ($i=0; $i<23; $i++) { echo 0.0001+($i*0.0001).'<br>'; } Expected result: ---------------- 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0007 0.0008 0.0009 0.0010 0.0011 0.0012 0.0013 0.0014 0.0015 0.0016 0.0017 0.0018 0.0019 0.0020 0.0021 0.0022 0.0023 Actual result: -------------- 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0007 0.0008 0.0009 0.001 0.0011 0.0012 0.0013 0.0014 0.0015 0.0016 0.0017 0.0018 0.0019 0.002 0.0021 0.0022 0.0023
  3. i found out what the problem was, its had to deal with the max excution time for the script. arround 100 rows to echo to broswer is best number
  4. yes it does not open correctly, first it opens, looks like it working then it looks like it is redirecting/reloading then it says pages can not be displayed i tested it in both browsers. also how would you code it please explain? also i can let you see a live example if you want
  5. i am haveing a problem echoing to the broswer. i am reading from a mysql database and then echoing the results to the browser in a neat table. everything works well when there are 100 records when when i try to echo a 1000 records to the broswer it chokes. I am using firefox and ie to test my script. here is the code i use $results=mysqltalk ('SELECT * FROM `cf_category` ORDER BY cateorgnum ASC ); $num_rows=mysql_num_rows($results); for($i=0; $i<$num_rows; $i++) { $row=mysql_fetch_assoc($results); echo '<table><tr><td width="137" valign="top">SAMPLE ROW DAta</td> <td width="425">SAMPLE ROW DAta</td></tr></table>'; }
×
×
  • 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.