Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,026 questions

51,982 answers

573 users

How to print an array of character in PHP

2 Answers

0 votes
$array = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p');

print_r($array);



/*
run:

Array
(
    [0] => a
    [1] => b
    [2] => c
    [3] => d
    [4] => e
    [5] => f
    [6] => g
    [7] => h
    [8] => i
    [9] => j
    [10] => k
    [11] => l
    [12] => m
    [13] => n
    [14] => o
    [15] => p
)

*/

 



answered Mar 26, 2024 by avibootz
0 votes
$array = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p');

foreach ($array as $ch) {
    echo $ch . "\n";
}



/*
run:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p

*/

 



answered Mar 26, 2024 by avibootz

Related questions

1 answer 130 views
130 views asked Aug 22, 2020 by avibootz
1 answer 144 views
1 answer 136 views
1 answer 148 views
1 answer 109 views
109 views asked Mar 26, 2024 by avibootz
1 answer 126 views
...