Questions tagged as 'php'

2
answers

How to differentiate data from two tables with columns of equal names in a SQL request with JOIN?

I've combined two tables with JOIN , the two tables have some columns with the same names ... When extracting data with PHP how will I differentiate? Example : foreach($dados as $values){ echo $values['price'];...
asked by 07.12.2016 / 12:26
2
answers

Return a function

I created a teste() function that must be populated with While and return the data. When I call my function teste() within the function PageLoad_Arquivo() it does not load? function teste(){ $resultadowhile = "<ta...
asked by 11.02.2015 / 20:26
3
answers

exchange char Z for S between vowels in a string

How can I change all occurrences of the letter Z between S within a string for example    TEREZA, CEZAR, BRAZIL, ANZOL would be    TERESA, CESAR, BRAZIL, ANZOL     
asked by 11.08.2016 / 17:09
2
answers

How to only receive gets from a given IP

I have to receive GETs with important information, and it can only be via GET and I can not see POST. I was wondering if there is any way to get the GETs from another server, only if that server had a certain IP. How can I do this?     
asked by 21.03.2016 / 11:49
2
answers

Script to go back to the previous page updated?

Well, I wanted something that would make it that when someone clicked to go to a page it was redirected to the previous page .. But the page refreshes ... I've made a small comments system, when I click to comment it goes to an "InsertComment...
asked by 23.06.2015 / 02:52
3
answers

Is it possible to include more than one .php file in the route of a Require?

I did not know the best way to ask this question, but I came across the following doubt ... Inside a document, I have some require_once (which I've been putting together for a while), in the code they look like this: <?php require_onc...
asked by 16.11.2015 / 17:16
3
answers

Cut text and add ellipses [closed]

I need a function that cuts a text without cutting words, adding a "..." at the end.     
asked by 08.11.2015 / 21:03
2
answers

What would a parameter call before the string in a function

I've seen several times do this: interface LoggerAwareInterface { public function setLogger(LoggerInterface $logger); } Put a parameter before the variable, in case what would it be and what does it do?     
asked by 06.03.2016 / 20:05
3
answers

Change value of an array when null

I have a WebService in PHP that returns me a JSON with values from a mySQL database. I need an Array, whenever there is a null value (when = null ), is changed to white ( = "" ). I'm doing it this way, but without success. &l...
asked by 04.11.2014 / 10:44
4
answers

Is there any difference between the is_file and file_exists function?

Is there any difference between the is_file and file_exists ? var_dump(file_exists('public/index.php'); // bool(true) var_dump(is_file('public/index.php')); // bool(true); Theoretically, the two would have the same sense, sinc...
asked by 04.09.2015 / 22:42