Mesaje recente

Members
Stats
  • Total Posts: 17,786
  • Total Topics: 1,234
  • Online today: 219
  • Online ever: 340
  • (22 November 2024, 00:10)
Users Online
Users: 0
Guests: 92
Total: 92

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