Jump to content

ereg ??? how


maumesh

Recommended Posts

hey frens i am reallly in trouble



i have some numbers
like 1231.23,254.34,21.2      and so on  .........

now i need a php program that will give the output like

1> 1000
      200
        30
          1
and  23  after the decimal

2> 200
      50
        4

and 34 after the decimal


and so onnnn




plz help me fasttttttttttttttttttttttttt



Link to comment
Share on other sites

there are a number of different ways to do that you can either split it by a string part 1 in 1 2 in the other etc. or you can use an array function perhaps to split it. Rather than me go through all of that here you should download the manual in chm format here: http://www.php.net/download-docs.php and then look up string functions. You need the str_pos fuction along with the strlen and the trim fuction if you going to go the string route or lookup array functions. Sorry I don't have time to go through all of this this morning, however you should find all this information now I have given you pointers in the php manual.
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.