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
https://forums.phpfreaks.com/topic/21636-ereg-how/
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
https://forums.phpfreaks.com/topic/21636-ereg-how/#findComment-96602
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.