Questions tagged as 'php'

2
answers

How to calculate the freight of various products

I'm developing a virtual store and I need to implement the freight calculation for the purchase, I managed to make this implementation but the problem is that with a single product in the cart I get the correct return, but with several products...
asked by 17.03.2014 / 20:11
3
answers

How to rename all tables in a MySQL database

I have a MySQL database with several tables and I'm migrating to another database.    I have a Client and must be a client PE       I have Product and must be Product_PE How can I accomplish this without however pausing to rename each of...
asked by 26.03.2015 / 04:52
3
answers

How to solve a Notice: Undefined index?

Starting in PHP and following a tutorial I used the above code and ended up getting this error:    Notice: Undefined index: submit in C: \ wamp \ www \ mezzo-com \ reservas.php on line 3 How to solve it?     
asked by 18.06.2014 / 04:07
3
answers

Problem when using substr in text with PHP

When using substr in a variable with text, it is returning a special character " " could anyone help me? I'm using the following code: $excerpt = get_the_content(); $excerpt = strip_shortcodes($excerpt); $excerpt = strip_tags($excerp...
asked by 06.03.2014 / 14:24
3
answers

In PHP the correct is else if or elseif?

In PHP, is correct else if or elseif ? What's the difference between them? The language allows you to write everything together and separate, and apparently the results are identical     
asked by 10.04.2015 / 20:50
3
answers

Floats module in PHP returns integers?

How do I get the rest of the division (modulo % operation) to decimal places when I use a divisor or float dividend? Example: echo 5 % 3; // imprime 2 como é esperado echo 5.6 % 3; // imprime 2 quando deveria imprimir 2.6  ...
asked by 20.12.2013 / 13:20
3
answers

Can I make JavaScript write PHP?

Can I make JavaScript write PHP? Related: Can I write in JavaScript within PHP? Can I write ajax and javascript together?     
asked by 01.10.2015 / 17:33
6
answers

How to find a value in an array with a specific structure

I need to find the position of an array inside another, in the following structure: array{ [0]=>{ ["id"]=>"5744" ["fk"]=>"7" ["nome"]=>"Nivel 1" ["created"]=>"2014-04-30 16:54:14" ["modified"]=>NULL...
asked by 30.04.2014 / 22:58
4
answers

How to take print (screenshot) of a web page?

I'd like to know how to get print out of a page, and save it as an image. Here is an example for understanding:     
asked by 15.05.2015 / 16:28
4
answers

Understanding the Node and Applications in real time

Since I first met CakePHP , I got used to programming with it, as it had a small learning curve and greatly speeded up development. For my recent application, I needed the data entered by the users to be monitored in real time in terms of th...
asked by 13.03.2014 / 15:12