Menu
Home
Recent Posts
How to: Delete an element from Array PHP
8:24 AM
0
Share
You can use
unset
<?
php $x
=
array
(
1
,
2
);
unset
(
$x
[
0
]);
var_dump
(
$x
);
?>
This is the output:
array
(
1
)
{
[
1
]=>
int
(
2
)
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Development and programming answers
Search articles
Popular Posts
How to solve: Parse error: syntax error, unexpected '['
This error comes in two variatians: Variation 1 $arr = [ 1 , 2 , 3 ]; This array initializer syntax was only introduced in PHP 5.4;...
How to solve: Nothing is seen. The page is empty and white in PHP
Also known as the White Page Of Death or White Screen Of Death. This happens when error reporting is turned off and a fatal error (often syn...
How to: Get thumbnail from YouTube video API from PHP and cURL
Each YouTube video has 4 generated images. They are predictably formatted as follows: http : //img.youtube.com/vi/<insert-youtube-video...
PHP 5: When to use $self or $this
From http://www.phpbuilder.com/board/showthread.php?t=10354489 : Use $this to refer to the current object. Use self to refer to the cu...
How to: Validate Email address in JavaScript
Using regular expressions is probably the best way. Here's an example ( live demo ): function validateEmail ( email ) { var ...
No comments:
Post a Comment