★ wanayoo — archive 1999 http://fr.php.net/manual/ja/function.array-pad.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Arrays
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Arrays
* array
* array_count_values
* array_diff
* array_flip
* array_intersect
* array_keys
* array_merge
* array_merge_recursive
* array_multisort
* array_pad
* array_pop
* array_push
* array_rand
* array_reverse
* array_shift
* array_slice
* array_splice
* array_unique
* array_unshift
* array_values
* array_walk
* arsort
* asort
* compact
* count
* current
* each
* end
* extract
* in_array
* array_search
* key
* krsort
* ksort
* list
* natsort
* natcasesort
* next
* pos
* prev
* range
* reset
* rsort
* shuffle
* sizeof
* sort
* uasort
* uksort
* usort

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: array_pad
View the source code for this pageSearch the site



Previous page
 array_multisort
 Updated
Tue, 27 Feb 2001
array_pop 
Next page


array_pad

(PHP 4 >= 4.0b4)

array_pad -- 指定長、指定した値で配列を埋める

説明

array array_pad (array input, int pad_size, mixed pad_value)

array_pad()は、pad_size で指定した長?`け値pad_valueをうめて inputのコピーを返します。 pad_sizeが正の場合、配列の右側が埋められます。 負の場合、配列の左側が埋められます。 pad_sizeの絶対値が inputの長さ以下の場合、埋める処理は 行われません。

例 1. array_pad()の例


$input = array (12, 10, 9);
 
$result = array_pad ($input, 5, 0);
// 結果は、array(12, 10, 9, 0, 0) です。
 
$result = array_pad ($input, -7, -1);
// 結果は、array(-1, -1, -1, -1, 12, 10, 9) です。
 
$result = array_pad ($input, 2, "noop");
// 埋める処理は行われません。
      


 About Notes


Previous page
 array_multisort
 Updated
Tue, 27 Feb 2001
array_pop 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.