Tekil Mesaj gösterimi
Alt 05 Ağustos 2021, 20:52   #7
ExCaLuBuR
ExCaLuBuR - ait Kullanıcı Resmi (Avatar)

Standart

**************************************************
31. is_numeric

Bir değişkenin sayısal olup olmadığını kontrol etmek için kullanılır.

PHP- Kodu

<?php
  $var 
678;

  if (
is_numeric($var))
  {
    echo 
"$var is a numeric value." ;
  }
  else
  {
    echo 
"$var is not a numeric value." ;
  }
?&
gt

**************************************************

32. array_shift

Bir diziden ilk öğeyi kaldırır ve silinen öğenin değerini döndürür.

PHP- Kodu

<?php
   $colors 
= array(0=>"orange",  1=>"green",  2=>"blue");
   echo 
array_shift($colors);
   
print_r ($colors);
?&
gt

**************************************************

33. defined

Sabit olup olmadığını kontrol eder.

PHP- Kodu

<?php
     define
("PI"3.14);
     echo 
defined("PI");
?&
gt

**************************************************

34. is_dir

Belirtilen dosyanın bir dizin olup olmadığını kontrol eder.

PHP- Kodu

<?php
  $directory 
"documents";
  if(
is_dir($directory))
  {
      echo (
"$directory is a directory");
  }
  else
  {
      echo (
"$directory is not a directory");
  }
?&
gt

**************************************************

35. json_decode

JSON dizesinin kodunu çözer


PHP- Kodu

<?php
    $json 
'{"a":1,"b":2,"c":3}';
    
var_dump(json_decode($json));
?&
gt


________________

🔥 Yaz Konus Sohbet’et!💬 IRC Chat Sohbet📱 Mobile Sohbet🎧 Canlı Radyo⚙️ mIRC Sohbet[Üye Olmadan Linkleri Göremezsiniz. Lütfen Üye Olmak için TIKLAYIN...]