Questions tagged as 'php'

1
answer

Real time with PHP

I am developing a system and soon I will have to start the part of interactions in real time (for notifications and chat). I am using jQuery , PHP and MySQL so far and I intend to continue with these technologies. I have a...
asked by 15.05.2015 / 22:02
2
answers

How to select an option in one select and load related data in another?

I would like to select an option of a <select> and fill the other <select> with related content. I will only be able to do this with the information stored in database database or how to do with array? How can I do t...
asked by 03.05.2014 / 02:21
1
answer

SQL LIMIT parametrized in PHP with PDO

A few days ago, I stopped using the mysql_* functions (because they are already obsolete), and switched to PDO . I have a function that does query the database, but I'm having some problems using LIMIT with prepared statem...
asked by 23.02.2015 / 16:00
8
answers

Printing a String until a space is found

I get a String through an input and I insert it into the database. When I list, I want only the first name of the person, that is, until the first space is found. Is there a function that does this?     
asked by 11.11.2015 / 20:04
4
answers

How to find out if the year is leap year?

How do I know if the current year is a leap year in PHP?     
asked by 20.01.2016 / 12:58
2
answers

Count of black pixels that were traced in image on the web

I want the user to trace a line in a biometric image and to make an automatic count of "black parts" of the digital that this line has crossed. I have no idea which tool to use and where to start ... Does anyone have a path? It's for...
asked by 08.06.2016 / 21:10
2
answers

Search with LIKE or MATCH..AGAINST in two columns

I have a classified system where I search with PHP and MySQL using LIKE in two fields: campo1 like '' or campo2 like '' The problem is when I look for something like "Green car" it does not display anything for "car" being contained i...
asked by 16.04.2014 / 20:26
1
answer

What is the purpose of Array and String Dereferencing implemented in PHP 5.5?

In the PHP manual, we can see the New Features functionality of Array and String literal Dereferencing . Example: echo 'string'[2]; // r echo ['stack', 'overflow'][1]; //overflow Thinking about whether to get a index from a strin...
asked by 03.07.2014 / 18:09
3
answers

Is it possible to handle PHP errors via code?

As everyone knows, PHP returns runtime syntax errors in the browser, such as fatal errors and exceptions. Is it possible to handle these errors via code so that I can save to the database in an error log table? The need is because I use a...
asked by 03.10.2014 / 19:38
6
answers

Code refactoring to convert GPS coordinates in DMS format into an array

You can enter the GPS coordinates in two ways, Decimal Degrees or Degrees, Minutes, Seconds : ┌─────────────────────────────────┬─────────────────────┐ │ DMS (Degrees, Minutes, Seconds) │ DD (Decimal Degree) │ ┌────────...
asked by 10.01.2014 / 17:09