Mesaje recente

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

inlocuire expresie regula in php...un mic ajutor

Started by kquizak, 07 January 2007, 12:07

Previous topic - Next topic

0 Members and 2 Guests 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