/    Sign up×
Community /Pin to ProfileBookmark

How to declare a matrix having 100 rows and 100 columns

Hello.

How can I declare a matrix having 100 rows and 100 columns?

Here is what I already know:

I know how to do it for 3×3:

[code]
$matrix=array(
array(1,2,3),
array(4,5,6),
array(7,8,9)
);
[/code]

And then I have found a way of adding elements to a one dimensional array:

[code]
$t7=array(“blue”,”red”);
array_push($t7,”green”,”yellow”);
[/code]

Thank you.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @codewitch spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 3.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...