Jessica
Staff Alumni-
Posts
8,968 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jessica
-
My bad
-
Yeah, we're the ones who don't understand....
-
Why would you have three links labelled differently with the same URL?
-
WHERE par > 6
-
I don't understand why this isn't doing anything.
Jessica replied to iWareWolf_'s topic in PHP Coding Help
... What did you think would happen? -
Limit results of table output by using ?limit=10
Jessica replied to Chendyboi's topic in PHP Coding Help
Your code says: If the limit is not set, and the limit is equal to 10 (a condition that can never happen), then fetch ten rows. Your code SHOULD SAY: if the limit is set cast the limit to an integer, then fetch that many rows. -
I'm sorry, but you're not really explaining the problem, and your code is not commented, so I have no idea what it's doing. Forget what you've tried already. Just try assigning the value you want to the variable you're using. Like I did above.
-
Also, switch to a templating engine instead of whatever you're doing now - Twig is great, Smarty is good.
-
Just store the value in a variable. $myTitle = $structure[0][cards][0][info][city][title]; Then use $myTitle. Stop trying to store the name of the array.
-
While it's a bad idea, it's perfectly valid syntax. <?php echo 'foo' ?> <?php echo 'bar' ?>
-
OP needs to use parse_url, the entire string is what they have. They are not the file at that URL, their file has received that URL
-
And what is the problem with writing that out? Are you stuck on using a loop to do it for each one? This is not a problem that requires variable variables.
-
To answer the original question: structure[0] is not a variable, so you cannot use it as a variable variable. If you post the actual array, we can help. <?php $structure = array('foo'); $str = 'structure[0]'; var_dump($structure[0]); // bool(true) var_dump($$str); // bool(false) ?>
-
Executing a script is not the same thing as reading a file. It doesn't matter if you know what you're asking if the people you're asking don't know what you mean. I had no idea what a .so file was, but one quick Google search gave me the explanation of what it was, and adding the term "PHP" to that same search gave me the exact code to load a .so file. We are not google. We don't appreciate people who don't do basic research, and waste our time with poor communication. Take responsibility for your part in getting help, and you'll actually get some.
-
Can't reply to website critique forum
Jessica replied to SleepingGiant's topic in PHPFreaks.com Website Feedback
For some forums you need 10 posts to be able to post there. Not sure why that one is included, but that's probably it. -
Did you bother to google "PHP read contents of file" or anything?
-
I don't understand why this isn't doing anything.
Jessica replied to iWareWolf_'s topic in PHP Coding Help
Then yes, your query is not returning anything. Did you try running the query directly in MySQL? Also, stop using Dreamweaver. Now. -
I don't understand why this isn't doing anything.
Jessica replied to iWareWolf_'s topic in PHP Coding Help
Well, turn on error reporting. A blank page where there should be output indicates a fatal error. -
Please read the forum rules. "Bumping" your post is not allowed. Have you checked your apache error log?
-
Is your field a DATETIME type? If not, fix that first. That date IS November 6th.
-
So figure out why. At first glance I'd say the problem is likely to be that you're looking for a root node, and one won't exist. So add some logic to capture that event, and create the needed node.
-
The code you've posted doesn't demonstrate anything to do with output. What you're asking is a very simple thing. Select your categories, then for each one list the three options. Zebra-striping is another easy concept, you can find tutorials for that by googling.
-
Nonsensical rage quit!!! Yay!
-
Get a good IDE - we have a thread in misc about various ones.