Questions tagged as 'php'

1
answer

How to return multiple JSON messages via PHP, each one being triggered at different times?

I'm building a system and at one stage it saves 3 sets of information filled out on the form by the system operator: Set 1: student information; Set 2: student guarantor information; Set 3: information about student enrollment. I am m...
asked by 15.12.2013 / 22:43
2
answers

View saved PDF file in a MySQL database

I have a field in a table where I place the PDF file. The type of this field is BLOB. I would like to know how to display this file on a PHP page, without having to create a directory. I just want the script to access the field of this tab...
asked by 30.01.2014 / 21:13
3
answers

Using preg_replace invalid password with SHA1

I was using preg_replace , to avoid SQL injection: $senha = preg_replace('/[^[:alpha:]_]/', '',$_POST['senha']); When comparing the $senha received by POST with the bank password (using SHA1), they are not compatible. Does a...
asked by 16.12.2015 / 16:46
2
answers

How to compare two arrays and return the difference between them?

I have 2 arrays that come from 2 different banks, one comes from the sql server another from mysql. Mysl query returns like this .. array (size=6) 0 => string 'ultimoteste3' (length=12) 1 => string 'ultimoteste3' (length=12)...
asked by 26.01.2016 / 12:43
1
answer

What is the elegant way to read this PHP Object?

I have Result of a Webservice below, I'm doing some foreachs to read each level of the class, but I think you should have a more elegant way of reading and getting the values of the object, follow Result : stdClass Object (...
asked by 29.01.2016 / 12:58
1
answer

What is the difference between NULL and null?

Is there any difference between NULL (written in upper case) and null (written in lowercase) in PHP? I know I can use both types, but is there any naming rule for these words?     
asked by 19.09.2017 / 23:05
2
answers

How to print an array with indexes and values in PHP?

I have the following array in PHP: $matriz['HGF']['Christus'] = 7; $matriz['HGF']['Unifor'] = 6; $matriz['HIAS']['Christus'] = 5; $matriz['HIAS']['Unifor'] = 4; I would like to print the array in html, displaying indexes and values, like th...
asked by 26.10.2017 / 16:31
1
answer

PHP Plugin Sublime text 3

Does anyone know the name of the PHP plugin that shows a description of the php function in my IDE when I put the cursor on it? By EX: function: str_replace(); When you put the mouse over it, a description of what it does, and what it do...
asked by 13.10.2017 / 14:23
3
answers

Add a comma to each word

Ex: $str = "texto de teste"; // RESULTADO ESPERADO $keywords = "texto, de, teste";     
asked by 08.12.2015 / 02:28
4
answers

CamelCase conversion function

I already have a function where it performs the conversion of strings to slug . Below I will give examples for facilitation in understanding my question. 3 examples before conversion: link para uma página link página...
asked by 08.11.2015 / 19:37