![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
King of Portal
|
I could use some brainstorming
I'm simplifying the actual problem in the hopes that it will make the idea more efficient.
This is the array setup: $foo[0] = 'something'; $bar[0][0] = 'something else'; $sna[0][0] = 'something more'; $bar[0][1] = 'another else'; $sna[0][1] = 'another more'; $foo[1] = 'more somethings'; $bar[1][0] = 'somethings elses'; $sna[1][0] = 'somethings mores'; ... So my question is how would I design a frontend HTML interface that would allow me to do the following:
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Jan 2007
Posts: 2
Rep Power: 0
![]() |
Arrays aren't dynamic enough for that.
You can't just add Array parameters. |
|
|
|
|
|
#3 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Excuse me, Shaffer? Please don't post misleading information. PHP arrays are indeed dynamic.
<?php
$mainArray = array ();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Array Growth</title>
</head>
<body>
<?php
echo "mainArray<br/>";
print_r ($mainArray);
echo "<br/>";
$elemOne = array ("Element One");
$elemTwo = array ("Element Two");
$elemOne [] = "Element OneTwo";
$elemTwo [] = "Elent TwoTwo";
$mainArray [] = $elemOne;
$mainArray [] = $elemTwo;
echo "mainArray grown<br/>";
print_r ($mainArray);
echo "<br/>";
?>
</body>
</html>Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#4 |
|
King of Portal
|
I actually figured out a way to do it sorry that I hadn't replied to this thread but I'd forgotten that I actually started it when I got involved in the solution. Here's a pic to illustrate the idea.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|