Mongo ID object with PHP library

PHP
I can not find any reference to creating a new MogoId istance with the new PHP library. With the legacy driver you would use new MongoId($id) however...
1 year ago

How to stop vanity url for sub-directory in domain

PHP
I have created a login interface where user can register there username. Now i wanted to give each user a vanity url like, example.com/user. I am usin...
1 year ago

Difference between & and && in PHP

PHP
I am confused with & and &&. I have two PHP books. One says that they are same, but the another says they are different. I thought they ar...
1 year ago

What does "->" mean/refer to in PHP?

PHP
What does -> mean/refer to in PHP? In the following from WordPress, I know what the if statement does, for example, but what does the -> do? ...
1 year ago

SSH/Crontab returning fetch_object() on a non-object

PHP
I've been developing a MMORPG game lately. And are almost done, just creating the daily cron.. I've got the following code: // Bank Interest $res = ...
1 year ago

CodeIgniter "Using $this when not in object context" in function

PHP
how I can replace $this variable in this code? I know that it is incorrect to use $this in functions, but I don't know how I may replace that. functi...
1 year ago

PHP how to separate a query string into variables

PHP
I have a paypal form that submits a the value of a custom hidden input. Since I have a few extra pieces of data to parse, I've added them as a query s...
1 year ago

please help, im trying to do php pagination

PHP
I'm trying to do pagination in php, everything seems to be working, except that next and previous links don't work, it's only when I manually insert t...
1 year ago

jQuery trigger event if key "enter" is hit

PHP
I want to trigger an event when the key "enter" is pressed. M'm using the following code but its not working and I don't know why. I've searched every...
1 year ago

PHP Send mail function. How to make one email address receive one email containing data based on the number of ticked checkbox in a table

PHP
I am working on a send mail function of my system. I have a table that shows the data from my database. The send mail function of my system goes like ...
1 year ago

Why does datetime->days always returns a positive number

PHP
$today = new DateTime(); $date = new DateTime('2013-03-10'); $interval = $date->diff($today); return $interval->days; // returns 4 $today = ne...
1 year ago

Laravel file upload just uploads .tmp file

PHP
For some reason this did not work in my view: {!! Form::open(['url'=>'notes','file'=>true]) !!} So I just used this which seemed to get me...
1 year ago

What is the difference between split() and explode()?

PHP
The PHP manual for split() says This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged...Use explode...
1 year ago

PHP __get and __set magic methods

PHP
Unless I'm completely mistaken, the __get and __set methods are supposed to allow overloading of the → get and set. For example, the following ...
1 year ago

In Phpmyadmin edit values inserted in table is not working

PHP
If you see in the picture , i am not getting any option to edit inserted values in table. I wanted to edit here for ex , 'test_input' coloumn for the ...
1 year ago

How to declare a global variable in php?

PHP
I have code something like this: <? $a="localhost"; function body(){ global $a; echo $a; } function head(){ ...
1 year ago

how to sum rows of mysql ouput in php

PHP
I have a table that looks like id user_id white brown green other day month year week 6 54 5 5 2 ...
1 year ago

Exceptions in PHP - Try/Catch or set_exception_handler?

PHP
I'm developing some lower end code in my system that uses multiple child classes of the php exception class. Essentially I have the exceptions broken...
1 year ago

Laravel 5.1 user profile link

PHP
Okey, so i creating a link to user profile. My controller looks like that: public function show($id) { $user = User::whereId($id)->User::w...
1 year ago

Laravel mail: pass string instead of view

PHP
I want to send a confirmation e-mail using laravel. The laravel Mail::send() function only seems to accept a path to a file on the system. The problem...
1 year ago