LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

366 solutions found in php-dev

Page 4 of 19
0 votes
1 ans
3 views
What is output buffering in PHP?

What is output buffering and why would you use it in PHP?

php-dev Solved
AB
asked 1 month ago by Abhimanyu
0 votes
1 ans
3 views
Are PHP Variables passed by value or by reference?

Are PHP variables passed by value or by reference?

php-dev Solved
CM
asked 1 month ago by cmcculloh
0 votes
1 ans
3 views
PHP - concatenate or directly insert variables in string

I am wondering, What is the proper way for inserting PHP variables into a string? <br/><br/> **This way:**<br/> echo "Welcome &q...

php-dev Solved
WE
asked 1 month ago by Web_Designer
0 votes
1 ans
3 views
Remove warning messages in PHP

I have some PHP code. When I run it, a warning message appears. How can I remove/suppress/ignore these warning messages?

php-dev Solved
AL
asked 1 month ago by Alireza
0 votes
1 ans
3 views
How do I make a request using HTTP basic authentication with PHP curl?

I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service. How do I use curl to make authenticat...

php-dev Solved
BL
asked 1 month ago by blank
0 votes
1 ans
3 views
How can I echo or print an array in PHP?

I have this array Array ( [data] => Array ( [0] => Array ( [page_id] => 204725966262...

php-dev Solved
EN
asked 1 month ago by EnexoOnoma
0 votes
1 ans
3 views
How can I add a PHP page to WordPress?

I want to create a custom page for my WordPress blog that will execute my PHP code in it, whilst remaining a part of the overall site CSS/theme/design. The P...

php-dev Solved
CI
asked 1 month ago by citronic
0 votes
1 ans
3 views
How to convert array to SimpleXML

How can I convert an array to a SimpleXML object in PHP?

php-dev Solved
MI
asked 1 month ago by Mike
0 votes
1 ans
3 views
What do strict types do in PHP?

I've seen the following new line in PHP 7, but nobody really explains what it means. I've googled it and all they talk about is will you be enabling it...

php-dev Solved
SU
asked 1 month ago by sufuko
0 votes
1 ans
3 views
How to extract and access data from JSON with PHP?

> This is intended to be a general reference question and answer covering many of the never-ending *"How do I access data in my JSON?"* questions....

php-dev Solved
US
asked 1 month ago by user3942918
0 votes
2 ans
5 views
How to get name of calling function/method in PHP?

I am aware of function `debug_backtrace`, but I am looking for some ready to use implementation of function like `GetCallingMethodName()`? It would be perfect i...

php-dev Solved
DA
asked 1 month ago by Dawid Ohia
0 votes
1 ans
3 views
Getting the first character of a string with $str[0]

I want to get the first letter of a string and I've noticed that `$str[0]` works great. I am just not sure whether this is 'good practice', as that...

php-dev Solved
TA
asked 1 month ago by Tatu Ulmanen
0 votes
1 ans
3 views
require(vendor/autoload.php): failed to open stream

I know that this issue has been posted many times, but for me it seems to be a different problem. Indeed, this error > Warning: require(vendor/autoload.ph...

php-dev Solved
AD
asked 1 month ago by adrTuIPKJ44
0 votes
1 ans
3 views
Simplest PHP example for retrieving user_timeline with Twitter API version 1.1

Because of the Twitter API 1.0 retirement as of [June 11th 2013](https://dev.twitter.com/blog/api-v1-retirement-date-extended-to-june-11), the script below does...

php-dev Solved
FE
asked 1 month ago by fellowworldcitizen
0 votes
1 ans
3 views
How to validate an email address in PHP

I have this function to validate an email addresses: function validateEMAIL($EMAIL) { $v = "/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/&quot...

php-dev Solved
CA
asked 1 month ago by Cameron
0 votes
1 ans
3 views
Visual Studio Code PHP Intelephense keeps showing a not existing error

After the latest update of PHP Intelephense that I get today, Intelephense keeps showing an error for an undefined symbol for my route (and other classes too)....

php-dev Solved
AD
asked 1 month ago by Adrian Edy Pratama
0 votes
1 ans
3 views
How to remove /public/ from a Laravel URL

I want to remove the `/public/` fragment from my Laravel 5 URLs. I don't want to run a VM, this just seems awkward when switching between projects. I...

php-dev Solved
US
asked 1 month ago by user1537360
0 votes
1 ans
3 views
How to insert an item at the beginning of an array in PHP?

I know how to insert it to the end by: $arr[] = $item; But how to insert it to the beginning?

php-dev Solved
WE
asked 1 month ago by web
0 votes
1 ans
3 views
Disable Laravel's Eloquent timestamps

I'm in the process of converting one of our web applications from CodeIgniter to Laravel. However at this moment we don't want to add the `updated_at` /...

php-dev Solved
MA
asked 1 month ago by mattcdev
0 votes
1 ans
3 views
PHP: Return all dates between two dates in an array

**Expected Input:** getDatesFromRange( '2010-10-01', '2010-10-05' ); **Expected Output:** Array( '2010-10-01', '201...

php-dev Solved
HY
asked 1 month ago by HyderA