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: Calculate the difference between 2 dates in PHP
Input: Start Date : 2007 - 03 - 24 End Date : 2009 - 06 - 26 Output: 2 years , 3 months and 2 days Use strtotime() to conve...
PHP: Highlight difference between two strings
You can use the PHP Inline-Diff package . It suits your needs, and is quite customisable as well. It's also licensed under the GPL, so...
How to read/write a MS Word file from PHP
Reading binary Word documents would involve creating a parser according to the published file format specifications for the DOC format. I th...
How to: Transact MySQL and PHP
The idea I generally use when working with transactions looks like this (semi-pseudo-code): try { // First of all, let's begin a...
No comments:
Post a Comment