I did see the ones in the git, but there are more in the zip i postedjacek wrote:Yes they are mine
They are also the ones in the git if you bothered to look !
BetterPHP PHP Library
Re: BetterPHP PHP Library
Re: BetterPHP PHP Library
Alright, so other things have come up, which definitely take priority over this. Sorry guys, you'll have to wait a tad longer
Please check out my CodeCanyon items.
Re: BetterPHP PHP Library
What kind of things are you looking for? My library has a fair few security check functions, but all the more useful functions I use tend to be site specific. Would I be able to add some JS functions?
btw - Js functions != using Jquery
btw - Js functions != using Jquery
Re: BetterPHP PHP Library
Anything that would be useful can be added
And I think JavaScript would have to be a different project, mostly because of the name.
And I think JavaScript would have to be a different project, mostly because of the name.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
well, mine will be continued upon arrival of a mySQL class
No rush tino
No rush tino
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
I added a basic one you should be able to use it to make your thing, and Tino can add some more complicated things to my mysql class if he feels like itbowersbros wrote:well, mine will be continued upon arrival of a mySQL class
No rush tino
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
how would i use the mysql class within? Like.. for the mysql server connection?
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
it would be a global variable so...
class user { public function get_names(){ global $mysql; $mysql->query('SELECT `name` FROM `users`'); $mysql->fetch_array($names); return $names; } }Go with that for now
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
Hmm, say if i have two arrays, both setup as single dimensions how can i fuse them together?
So for example, I have these:
(This is to be used for the validation thing, to check for unique values in a mysql field(s))
/edit.
Or should i do it where it is one multidimensional arrays so they can check multiple things within 1 array.
Eg.
array('users' => array('username','email))
Like that.
However, i dont know how to do either atm (spend 4 hours solid literature revision, my brain hurts!)
which method is best?
So for example, I have these:
$array1 = array('users','table1','table2','table3'); $array2 = array('username','password','blah','blah');How could i make it so that the $array 1 values were the keys, and the $array2 values were the values?
(This is to be used for the validation thing, to check for unique values in a mysql field(s))
/edit.
Or should i do it where it is one multidimensional arrays so they can check multiple things within 1 array.
Eg.
array('users' => array('username','email))
Like that.
However, i dont know how to do either atm (spend 4 hours solid literature revision, my brain hurts!)
which method is best?
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
array_combine() will do that for youbowersbros wrote:How could i make it so that the $array 1 values were the keys, and the $array2 values were the values?
Entirely up to you do it the best waybowersbros wrote:Or should i do it where it is one multidimensional arrays so they can check multiple things within 1 array.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
there is an is_array() function, is there something that checks for multidimensional array? if so, i could incorporate bothjacek wrote:array_combine() will do that for youbowersbros wrote:How could i make it so that the $array 1 values were the keys, and the $array2 values were the values?
Entirely up to you do it the best waybowersbros wrote:Or should i do it where it is one multidimensional arrays so they can check multiple things within 1 array.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
-
- Posts: 165
- Joined: Fri May 06, 2011 5:02 pm
Re: BetterPHP PHP Library
Where will these library files be accessible from? Surely, just posting them in this thread is terribly inefficient.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
read first postunemployment wrote:Where will these library files be accessible from? Surely, just posting them in this thread is terribly inefficient.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
got it, apparently:
if (count($array) == count($array, COUNT_RECURSIVE)) { echo 'array is not multidimensional'; } else { echo 'array is multidimensional'; }works
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
Oh I see what you wanted to do now, well you seem to have found a good enough solution
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
is that the best way? or is there like a hidden function that is obscure yet does this? if not. they should make onejacek wrote:Oh I see what you wanted to do now, well you seem to have found a good enough solution
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
I don't know of a way to do that other than what you did.bowersbros wrote:is that the best way? or is there like a hidden function that is obscure yet does this?
Or we should for the librarybowersbros wrote:if not. they should make one
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
that would require a new functions.inc.php file then
If you want to start it, uplaod it and just include:
If you want to start it, uplaod it and just include:
function is_multi(array $array){ if(count($array) == count($array, COUNT_RECURSIVE)) return false; }
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9