I know that to display a rounded number you just do echo "round($number)";. But how would I convert the $number varible into a rounded number, so that when I say echo "$number"; the rounded number shows up? For example I have a calculation that calculates the distance between two locations using longitude and latitude. $distance is the final result. But $distance is a very long decimal number. To do further calculations with it, I would like to round $distance so that it has no decimal places anymore (So 1482.894736593 would = 1483). So $distance would now equal 1483, not 1482.894736593. Then I could go on and calculate the time, cost, etc. and $number will stay rounded.
Do you know what I am saying?
need help in update query
hi i have a dynamic form. i need help in how can i use update query when values from dynamic form get pass to php file.currently when i press submit it displays this and does not update fieldsCode:
Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.I have a multidimensional array filled with values that I am trying to output into an html table. This works (outputs value of array):Code:
Impact of movement type 412 E on MAP
Hi
Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO principles. I've started reading OOP tutorials including the design patterns. And John is right, this
Question about the upload of large files
Hi there,I have a question about the upload of large files, like videos (files generally above 20Mo).Is it better to use the FTP functions of php or the normal upload fonctions using additional
Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be combined into one comma seperated string (eg variable1,variable2,variable3,variable4). This i can do
MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them in database. I have issues while inserting...foreach ($sentences as $final) {......else {
Material Issuing for receiving batch
Dear All experts in MM/ PP,
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there
extract content from a website
i have written a code that will grab the content from the index page..i would like to know how can i leech completely thru the site (index,contact, news pages) and grab specific content only like