Questions tagged as 'php'

3
answers

Variable is not updated in constructor

I'm learning OO and venturing into PHP, but I've come across something I believe in theory should work, but in practice it does not. <?php class Users{ public $name; public $idade; public $email; private $senha; function __co...
asked by 30.08.2016 / 23:04
3
answers

Error creating a MySQL database via PHP in WampServer

I have a problem when creating the database, on the net I found little content about, only meeting how to mount database by phpMyAdmin, but it is via script that I want to create. > I have the following code: <?php $mysqli = new mysqli...
asked by 28.09.2014 / 14:52
3
answers

How do I get the $ _GET value of a URL in CodeIgniter

I am sending a value get through a link for example: <a href="/admin/editar_user/5">Editar</a> And there in the method of my controller that calls the view I get: public function editar_user(){ $this->load->vi...
asked by 11.03.2014 / 16:04
2
answers

References for web programming learning [closed]

What sites can I check to start studying web programming? I'm a beginner on the subject.     
asked by 06.12.2014 / 13:42
1
answer

Mount array with txt data

I am trying to find a way to set up a table with the data of a txt, but I do not know how to separate the values in the array, since they are separated by several spaces, but are identified by fields (Name: : ...); Example of a txt file: C...
asked by 21.08.2014 / 20:16
2
answers

Problem when performing XHR in the same domain (localhost)

Explanation: I have an application running on a client computer, it worked normally for some time, then something happened that the system could only be accessed from outside and locally it did not work anymore . Problem: XHR is not ge...
asked by 10.09.2014 / 19:18
2
answers

Insert Multiple Record in PHP MYSQL table

I'm trying to make a INSERT using PHP to insert multiple records into the DB at once. My code is only inserting the first row of the data. It even displays all the lines, but to insert, only the first one is sent to the DB. include "...
asked by 21.08.2014 / 20:42
2
answers

How does PHP handle temporary expression for memory?

In PHP, it is possible to iterate the elements of a array through foreach , both with the variable that contains it and what PHP called " temporary array expression " . Example: $myArray = ['a' => 'a', 'b' => 'b']; foreach (...
asked by 29.09.2014 / 17:53
3
answers

What is the difference in checking an array with isset and array_key_exists?

In PHP we often have more than one way of doing the same operation. A basic example is in checking for the existence of a given index in array : we can use array_keys_exists . Example: $arr = ['a' => 1, 'b' => 2]; var_dum...
asked by 10.03.2016 / 17:30
4
answers

Validate phone number with optional ninth digit

How do I validate my phone number with the optional ninth digit? in the following formats: DDD + 8 digits = (21) 9876-5432 DDD + 9 digits = (21) 98765-4321     
asked by 19.11.2016 / 05:45