IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.49 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-10
Pages: < Prev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Next >
[09:07]<lwgx>ErenTurkay: what is $veriable? as in what does it contain? A string, int? Read up on boolseans: http://php.net/bool
[09:07]<rslyrzyrr>cool... i'll put it in
[09:07]<d-rja>yep
[09:08]<gzggtuzcrd>L1nX: on errors. that is a string,
[09:08]<gzggtuzcrd>L1nX: if there is no error returns true
[09:08]<ymj>hi
[09:10]<gzggtuzcrd>hi ido
[09:11]<lwgx>ErenTurkay: well if an empty string or a string with "0" returns false but everything else returns true... Maybe change it so if there is no error it returns false then you should be able to use if($verible != true)
[09:11]<usrprg>hey everyone im a php noob, and just have a question, it seems like its pretty simple
[09:11]<usrprg>basically i want to do this
[09:11]<lwgx>or better yet: if($verible == false){ // There was no error }else{ // There was an error }
[09:12]<usrprg>if a certain variable hasnt been set or is empty, do xyz, and if it has been set to something, do abc
[09:12]<usrprg>and when i mean do xyz or do abc, i want to echo something
[09:12]<gzggtuzcrd>L1nX: thanks but
[09:12]<gzggtuzcrd>L1nX: it is hard for me
[09:12]<gzggtuzcrd>L1nX: if($veriable != 1) is simple for me.
[09:13]<gzggtuzcrd>L1nX: thanks for everything.
[09:13]<lwgx>np
[09:14]<lwgx>if (!isset($variable) OR $variable == null){ // do xyz }else{ // do abc }
[09:16]<rslyrzyrr>d-roc: still no good.
[09:16]<usrprg>ok thanks man
[09:16]<usrprg>i kinda gathered that from your above
[09:16]<usrprg>ill fiddle with it
[09:16]<rslyrzyrr>IE won't catch the cookie
[09:18]<rslyrzyrr>i'm using php v.4.2.1
[09:19]<rslyrzyrr>d-roc: you wanna try if your IE will get it?
[09:20]<nyzqwq>what's wrong with this: $tmp299 = str_replace("\","",$tmp299);
[09:20]<nyzqwq>it's says syntex error something about
[09:20]<nyzqwq>\'
[09:20]<lwgx>because \ makes the " escaped
[09:20]<usrprg><?php if (!isset($page_title) OR $page_title == null) { echo "" } else { echo " - " } ?>
[09:21]<usrprg>thats giving me an error right now
[09:21]<nyzqwq>L1nX, how can i correct that?
[09:21]<jnnnc>im having a problem. when i do include "http://cristelmedia.com/error.php?e=404"; it works but then i do include "error.php?e=404"; and it doesnt work
[09:21]<rslyrzyrr>Nir: the '\' is an escape character. try '\\'
[09:21]<lwgx>Nir212: use this: $tmp299 = str_replace('\',"",$tmp299); or $tmp299 = str_replace("\"","",$tmp299);
[09:21]<lwgx>oh sorry last one should be: "\\" not "\""
[09:21]<jnnnc>also if i do inlcude "error.php"; it works
[09:22]<lwgx>uscfan: What error is it giving you?
[09:22]<usrprg>Parse error: syntax error, unexpected '}', expecting ',' or ';'
[09:22]<lwgx>oh I see
[09:22]<lwgx>here <?php if (!isset($page_title) OR $page_title == null) { echo ""; } else { echo " - "; } ?>
[09:22]<lwgx>you forgot the ; at the end of each echo
[09:22]<usrprg>wow your a god
[09:23]<jnnnc>anyone?
[09:24]<usrprg>ok i got another question
[09:24]<lwgx>Jezek: AFAIK you cant include a local file like that it must be: include("error.php");
[09:24]<vmmwno9>how do i echo the description from mysql after starting a session?
[09:24]<usrprg>lets say i have a folder called gateway, is there any way to have php look in the url and set the page_title based on the folder that the php file is in?
[09:24]<usrprg>so like
[09:25]<jnnnc>so how would i pass variables through get
[09:25]<usrprg>if i have index.php in the folder called gateway, $page_title will be gateway?
[09:25]<lwgx>Jezek: Set it like this: $e = 404; include("error.php"); if you really need to set it like this: $_GET['e'] = 404;
[09:25]<lwgx>uscfan: yes
[09:26]<jnnnc> ok
[09:26]<jnnnc>ic
[09:26]<lwgx>so you want something like: http://www.website.com/gateway/index.php 's page title to become: Gateway?
[09:26]<usrprg>roger roger
[09:26]<usrprg>if it can automatically capitalize that it would be great
[09:27]<usrprg>if i were doing it in the html id use css to capitalize it
[09:27]<usrprg>but this is also in the <title> element
[09:27]<lwgx>Do you want it capitalized? You can do that as well without css
[09:28]<usrprg>yes id like it capitalized
[09:28]<lwgx>okay
[09:28]<yzjrlyr>I need a little help, how do I take two arrays with the same keys and text values and turn them into one array with the array's combining the text in each key... Not like with push where it just adds the values to the array.
[09:29]<nzzz>just only use 1 of them
[09:29]<rslyrzyrr>use foreach() and step through appending the one you will keep
[09:29]<nzzz>if they both have the same crap in them there is no need for 2
[09:29]<yzjrlyr>they are the same number of keys, but they have different info
[09:30]<nzzz>ah I thought you ment they both had the same info
[09:30]<yzjrlyr>so like, red, blue, green is array 1 and car, boat, truck is array 2.
[09:30]<nzzz>and you want red => car blue => boat etc?
[09:31]<yzjrlyr>I want to then have an array with red car blue boat etc...
[09:31]<rslyrzyrr>use foreach()
[09:31]<nzzz>yep
[09:31]<yzjrlyr>hmm
[09:32]<yzjrlyr>see I was trying this.. I guess I got lost. :p
[09:32]<yzjrlyr>thanks :)
[09:32]<mrgp_wn6n>Hi
[09:32]<rslyrzyrr>then array(1)$key = array(1)$key.array(2)$key
[09:32]<mrgp_wn6n>I'm trying to collect some info on doing the following:
[09:32]<mrgp_wn6n>I need to transform something like this: src="../../../images/default/front_page.png"
[09:33]<mrgp_wn6n>in src="images/default/front_page.png"
[09:33]<mrgp_wn6n>Any clues on how to do that?
[09:33]<mrgp_wn6n>that line is part of a bigger string ofcourse
[09:34]<rslyrzyrr>this place is cool... can anyone tell me why IE won't catch cookies and netscape does?
[09:34]<usrprg>maybe ie is set not to catch em?
[09:34]<rslyrzyrr>i asked it to in the tools ->options->privacy tab
[09:35]<rslyrzyrr>but it won't!
[09:35]<usrprg>try using ie on another computer
[09:35]<usrprg>i can test something for you if you want me to
[09:35]<rslyrzyrr>cool...
[09:35]<rslyrzyrr>http://www.playsyzygy.com/newcookie.html
[09:36]<rslyrzyrr>ooops. should be testcookie.html
[09:36]<rslyrzyrr>then scroll down and see if you have cookies listed in 'Apache Environment'
[09:37]<usrprg>testcookie.html doesnt exist
[09:38]<rslyrzyrr>uhoh. lemme check...
[09:38]<rslyrzyrr>testCookie.html
[09:38]<rslyrzyrr>capital C
[09:39]<lwgx>uscfan: http://pastebin.ca/63546







