[Clipart] cchost test installation for Open Clip Art Library
crschmidt at crschmidt.net
Sun Feb 12 06:28:27 PST 2006
On Sun, Feb 12, 2006 at 06:24:35AM -0500, Jonadab the Unsightly One wrote:
> Christopher Schmidt <crschmidt at crschmidt.net> writes:
> > Yeah, this isn't quite right. $vars['sitename']['v'] seems like it's
> > proably coming from:
> > 'sitename' => array( 'n' => 'Site Name',
> > 'e' => '', 't' => 'text', 'v' => '' ,
> > 'q' => 0, 'h' => 'The name of your site' ),
> Ah, that was the other possibility, but I'm not able to see there
> any value getting assigned to $vars['sitename']['v']. It looks like
> it would be getting an empty string, so then where is the "Open Clip
> Art Library" coming from? I'm lost.
Don't feel bad. My job title is "Senior PHP Developer", I use it full
time, and have been working with it for 5 years, and I still didn't know
where to find it. So, it's definitely not just you :)
> > In other words, I'd check the DB for the sitename, and see what you
> > can find.
> Aha. That does make sense. The string 'sitename' mightn't
> necessarily appear in the code if it's loading stuff in from the
> database, because it might just blindly load whatever's there in a
> certain table or somesuch. That would explain why I couldn't see
> where the value was coming from.
You and me both.
Going back to a quick datatypes discussion:
All 'arrays' in PHP are 'hash'es in perl. They can have either named or
numbered keys, or both:
$array = array();
$array = "A";
$array['foo'] = "b";
0 => "A",
"foo" => "b"
You can also have arrays inside arrays, as above:
$vars['sitename'] is an array/hash, with ['v'] as a key.
More information about the clipart