Mesaje recente

Members
Stats
  • Total Posts: 17,786
  • Total Topics: 1,234
  • Online today: 178
  • Online ever: 340
  • (Yesterday at 00:10)
Users Online
Users: 0
Guests: 196
Total: 196

inlocuire expresie regula in php...un mic ajutor

Started by kquizak, 07 January 2007, 12:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kquizak

in php vreau sa trunchiez un nr cu virgula mobila(de forma 4.546456567) la un numar intreg

am facut asta:
$nrSapt=$nrZileLuna/7;
ereg_replace("\.[0-9]{*}","",$nrSapt);
nu le am cu expresiile regulate...poate sa ma ajute careva
Posted on: 07 January 2007, 11:48
am gasit solutia...

$nrSapt=ereg_replace("(\.[0-9]*$)","",$nrZileLuna/7);

network-tools.ath.cx ---nmap yourself

kman