Questions tagged as 'php'

3
answers

Error in line 0 (zero)? How can this be?

In PHP, when an error occurs, usually the line of the script where the same occurred is informed:    Undefined index 'a' in line 5 But there are times when error 0 is returned at line 0. Example:    Fatal error: Call to a member fun...
asked by 12.05.2016 / 15:24
1
answer

Pass variables with same name to PHP

I can not get the field return in PHP, when I enter more than 01 in quantity .... can anyone help me? $(function() { var input = $('<input name="cp1" id="cp1" type="text" />'); var input2 = $('<input name="cp2" id="c...
asked by 03.07.2015 / 21:42
1
answer

Does PHP support Bluetooth?

If not, in general (web) does bluetooth support exist? Is there a way to make communication between PORT (Bluetooth) for web?     
asked by 22.06.2015 / 16:18
1
answer

PHP script that lists and edits other files

How can I create a script where it will list all the files that are in the main folder and subfolders so that you can edit the files and replace with what was edited? If possible, have a function to delete the file if you want. Does anyone...
asked by 24.12.2015 / 00:14
3
answers

Error listing items in an array with foreach ()

I have array with the list of several Brazilian banks and I need to get the name of the bank where the code of it is passed according to what it has in the user's account, but when doing this search for the code it r...
asked by 28.12.2015 / 18:52
1
answer

With this rule below, how do I display the user's first and last name in the database?

Example of the name that is in the DB: José ALberto da Silva Nogueira. I would like you to show only José Nogueira. <?php if(!Yii::$app->user->isGuest) echo Yii::$app->session->get('nomeUsuario'); ?>     
asked by 29.12.2015 / 14:48
1
answer

What is the difference between array_walk and array_map?

In PHP, we have two functions that run through the array and apply a given function to each element: array_walk and array_map. Example: $meu_array = array(1, 2, 3); $callback = function ($value) { return $value * 2; }; $novo_array =...
asked by 28.07.2015 / 17:48
2
answers

How to transform a hash into a color

How to transform a hash into a random color .. Notice that I used the hash expression just to say that a cluster of letters / numbers can be transformed into color like this: d0be2dc421be4fcd0172e5afceea3970e2f3d940 is non-nonsense, nonsens...
asked by 09.08.2015 / 17:54
1
answer

Array no .ini How to do?

Hello everyone, I would like to know if the possibility of doing array in .ini Using php to call it?     
asked by 05.08.2015 / 20:32
1
answer

How to make a slug pagination in Cakephp?

Cakephp by default generates a pagination with indexes, for example: noticias/listar/page:2 I would like to paginate this way: notícias/listar/2     
asked by 19.05.2014 / 20:27