Most voted questions in PHP

0 votes
2 answers

How to override trait function and call it from the overridden function?

instead of: return traitcalc($v); use this: ...READ MORE

Dec 13, 2020 in PHP by Uncle Nick
3,849 views
0 votes
1 answer

How to get xdebug var_dump to show full object/array?

Hello. These are configurable variables in php.ini: ; with ...READ MORE

Apr 7, 2020 in PHP by Niroj
• 82,840 points
3,881 views
0 votes
1 answer

How can I handle the warning of file_get_contents() function in PHP?

Hello @kartik, This is fairly simple: if (!$data = ...READ MORE

Apr 7, 2020 in PHP by Niroj
• 82,840 points
11,350 views
0 votes
1 answer

What does double question mark (??) operator mean in PHP?

Hello, It's the "null coalescing operator", added in ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,840 points
7,669 views
0 votes
1 answer

Composer install error - requires ext_curl when it's actually enabled?

Hello, on php7 run for example: > sudo apt-get ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,840 points
16,805 views
0 votes
0 answers

How to compile PHP code and upload a binary-ish file, which will just be run by the byte code interpreter?

PHP is compiled to byte code before ...READ MORE

Apr 2, 2020 in PHP by kartik
• 37,520 points
3,152 views
0 votes
1 answer

Error:PDOException SQLSTATE[HY000] [2020] No such file or directory in php?

Hello, I checked php -i | grep pdo and noticed ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,840 points
1,533 views
0 votes
1 answer

How to prevent XSS with HTML/PHP?

Hello, HTML Encoding htmlspecialchars will convert any "HTML special characters" ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
1,141 views
0 votes
1 answer

How to merge two arrays while keeping keys instead of reindexing in php?

Hello, Considering that you have $replaced = array('1' => ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
3,112 views
0 votes
1 answer

What are the best way to allow plugins for a PHP application?

Hii, Here is an approach I have  used, it's ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
799 views
0 votes
1 answer

How to convert an image to base64 encoding?

Hello @kartik, You can also do this via ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
4,157 views
0 votes
1 answer

How to send email using php?

Hello @kartik 1.) Download PHPMailer, open the zip file ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
1,429 views
0 votes
1 answer

How to install a specific version of package using Composer?

Hello, Just use php composer.phar require For example : php ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
3,732 views
0 votes
1 answer

How to check if php session is already started or not?

Hello kartik, Use session_id(), it returns an empty string ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
5,850 views
0 votes
1 answer

Error:“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP

Hello @kartik, The best way for getting input string is: $value ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
37,655 views
0 votes
1 answer

How to get thumbnail of youtube video from youtube API?

Hii @kartik, If you want the biggest image ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,840 points
1,690 views
0 votes
1 answer

What is the use of $_REQUEST variable in php?

Hii @kartik, The $_REQUEST variable is used to read the ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,468 views
0 votes
1 answer

How can you upload a file using PHP?

Hello, To upload a file by using PHP, ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
918 views
0 votes
2 answers

How can we create a session in PHP?

Hello, niroj. Here is my idea session_start(); $_SESSION['USERNAME'] ...READ MORE

Dec 7, 2020 in PHP by Famous
• 140 points
1,319 views
0 votes
1 answer

What are the differences between mysqli_connect and mysqli_pconnect?

Hello, mysqli_pconnect() function is used for making a persistence ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,916 views
0 votes
1 answer

How to retrieve or obtain data from the MySQL database using PHP?

Hello kartik,  Actually there are many functions that  ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,520 views
0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
1,407 views
0 votes
1 answer

What is type casting and type juggling in php?

Hey, The way by which PHP can assign ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
7,247 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,352 views
0 votes
0 answers

How to Upload Aws lightsail increase upload size

Aws lightsail wordpress increase upload size limit ...READ MORE

Mar 16, 2020 in PHP by anonymous
• 120 points
1,557 views
0 votes
1 answer

What is Php Mysql Database? How php connect to database?

Hello kartik, MySQL is the most popular database ...READ MORE

Feb 25, 2020 in PHP by Dey
1,223 views
0 votes
1 answer

How to shrink Navigation menu or bar on Scroll?

Hey, You can follow the steps below in ...READ MORE

Feb 19, 2020 in PHP by varun
3,902 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

Feb 19, 2020 in PHP by Niroj
• 82,840 points
1,155 views
0 votes
1 answer

Complete PHP form with proper validation and syntax

Hey @kartik, It's quite simple to have php ...READ MORE

Feb 19, 2020 in PHP by Niroj
• 82,840 points
1,608 views
0 votes
1 answer

What is Php json?

Hii @kartik, JSON stands for JavaScript Object Notation, ...READ MORE

Feb 14, 2020 in PHP by Niroj
• 82,840 points
642 views
0 votes
1 answer

How to validate E-mail and URL of Php form?

hey, The code below shows a simple way ...READ MORE

Feb 13, 2020 in PHP by manish
2,434 views
0 votes
1 answer

What is a Cookie? How to create Cookies With PHP?

A cookie is often used to identify ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,840 points
3,907 views
0 votes
1 answer

How can you display the error messages?

Hey, In the HTML form, we add ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,840 points
3,601 views
0 votes
1 answer

How to Validate Form Data With PHP?

Hey @kartik, The first thing we will do ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,840 points
3,453 views
0 votes
1 answer

How can we avoid my php form from hacking?

Hii @kartik, If you want to know php ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,840 points
2,647 views
0 votes
1 answer

What are the vulnerability related to PHP Form?

Hii, The $_SERVER["PHP_SELF"] variable can be used by ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,840 points
3,315 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

Aug 8, 2020 in PHP by anonymous
10,804 views
–1 vote
1 answer

Error:Notice: Array to string conversion in C:\xampp\htdocs\Niroj\FinalSubmissionOfTheFormPHP.php on line 8

Hello @kartik, When you have many HTML inputs ...READ MORE

Aug 27, 2020 in PHP by Niroj
• 82,840 points
10,583 views