in_array php
<?php
$os = array("Apple", "Banana", "Lemon");
if (in_array("Apple", $os)) {
echo "Yeah. Exist Apple";
}
if (!in_array("Buleberry", $os)) {
echo "Oh, Don't Exist Blueberry!!!";
}
?>
in_array php
<?php
$os = array("Apple", "Banana", "Lemon");
if (in_array("Apple", $os)) {
echo "Yeah. Exist Apple";
}
if (!in_array("Buleberry", $os)) {
echo "Oh, Don't Exist Blueberry!!!";
}
?>
array splice php
<?php
$input = array("red", "green", "blue", "yellow");
array_splice($input, 2);
var_dump($input);
$input = array("red", "green", "blue", "yellow");
array_splice($input, 1, -1);
var_dump($input);
$input = array("red", "green", "blue", "yellow");
array_splice($input, 1, count($input), "orange");
var_dump($input);
$input = array("red", "green", "blue", "yellow");
array_splice($input, -1, 1, array("black", "maroon"));
var_dump($input);
?>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us