The Loop

Where humor doesn’t work.
Dec 11, 2013 17:11
Oh sorry lol. I kinda figured that but I threw it out there just in case ;)
Dec 11, 2013 17:07
I see
Dec 11, 2013 17:05
omfg..i just realized im in the loop..
Dec 11, 2013 16:59
im desperate lol. plus ill never get up to 500 rep anyway so shrug
Dec 11, 2013 16:57
0
Q: BuddyPress: Conditionally filter directory based on Xprofile Field

AliyahMembers Loop Query <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?> Question: How can this function be integrated into the members loop so that Female members are served a directory of males and male members are served a directory of females?** <?php class BP_Cust...

Dec 11, 2013 16:57
if anyone is bored..
Dec 11, 2013 16:52
hello brainiacs
Dec 11, 2013 02:26
hey @toscho
Dec 11, 2013 02:16
0
Q: BuddyPress: Show male members in directory if viewer is female + vice versa

AliyahI need to filter the members directory based on a custom profile field. When viewing the members directory I only want the women to see the men and the men to see the women listed. How can this code be expanded with conditionals to accomplish this? class BP_Custom_User_Ids { private $c...

Dec 11, 2013 02:15
Oh darn..so close. Any help guys?
Mar 22, 2013 21:06
I want to display an image (defined by me) next to a user who meets a certain criteria. Should I make a custom field for this and then an if else statement?
Mar 22, 2013 21:00
lol..wyck? :-D
Mar 22, 2013 20:35
Yay! Thank you toscho!
Mar 22, 2013 20:27
Its a php course im in right now@toscho they wont let me go to the next level until i learn how to use a switch :(
Mar 22, 2013 20:26
I suppose I dont know the scope of case..thus, I will remain stuck on this lesson for a while
Mar 22, 2013 20:25
but perhaps..i dont fully understand how to use switch. Im reading on php.net that its similar to an if, elseif, else statement but..
Mar 22, 2013 20:24
I thought I could just define$myNum=5 and then try to make a switch function echo something if myNum equals 5, is less than 5 or greater than 5
Mar 22, 2013 20:20
Oh thats so cool I never knew of that place
Mar 22, 2013 20:19
Thanks Toscho!
Mar 22, 2013 20:17
am i wrong for starting my switch like that?
Mar 22, 2013 20:16
    <?php
 $myNum=5;
 switch($myNum){

 }
?>
Mar 22, 2013 20:16
aargh!
Mar 22, 2013 20:14
hmm this is challenging
Mar 22, 2013 20:10
do I have to define a variable first for my switch?
Mar 22, 2013 20:09
ive gotten all the way to 'advanced switching' and i have to write my own switch statement
Mar 22, 2013 20:06
i mean codeacademy lol
Mar 22, 2013 20:06
yea
Mar 22, 2013 20:06
the error is from a course on codecanyon
Mar 22, 2013 20:05
you were right. i put default:echo"jhkh"; and it passed
Mar 22, 2013 19:57
Error message: "Oops, try again! Make sure you add the default case!"
Mar 22, 2013 19:55
switch ($fruit) {
    case 'Apple':
        echo "Yummy.";
        break;
}
Mar 22, 2013 19:55
whats wrong with this? switch ($fruit) {
    case 'Apple':
        echo "Yummy.";
        break;
}
Mar 22, 2013 19:55
Im stuck in my practice php course
Mar 22, 2013 19:31
omg slaps forehead i got it. im such a noob
Mar 22, 2013 19:29
"For instance, it's true that 6 is less than 7. How would we write that in PHP?" Should i echo this? <?php echo 6 < 7; >
Mar 22, 2013 19:28
since you put it that way, i fully understand what unset does :)
Mar 22, 2013 19:27
right i see the logic there
Mar 22, 2013 19:25
i see now, pardon my misunderstanding
Mar 22, 2013 19:17
must have been a glitch, gone now sry
Mar 22, 2013 19:15
without a semicolon, the output repeats. How come?
Mar 22, 2013 19:15
<?php
            echo "Oh, the humanity!"
          ?>
Mar 22, 2013 19:04
the function still ran but you no longer need it so you clean up after it
Mar 22, 2013 19:03
ok ok NOW i understand. Removing all traces of the crime
Mar 22, 2013 19:00
i almost understood until you said 'no longer be there' sigh reminds me of my cat. she 'no longer be there' .. at my house because she prefers to run the streets :-(
Mar 22, 2013 18:58
im confusing myself. i was thinking that unsetting the thing would make it disappear from the rendered page o_o
Mar 22, 2013 18:57
(i almost got it..im so close!)
Mar 22, 2013 18:57
no longer be there?
Mar 22, 2013 18:56
"they will work, but all globals prior to that point will no longer be there as they'll have been unset"
Mar 22, 2013 18:55
lol
Mar 22, 2013 18:54
...so unsetting globals would render all $GLOBALS null..and they wont work anymore?