Jump to content

bobtutos

Members
  • Posts

    10
  • Joined

  • Last visited

About bobtutos

  • Birthday 12/26/1986

Previous Fields

  • Languages
    eng

Recent Profile Visitors

1,529 profile views

bobtutos's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. how to populate PHP multidimensional array and add the attributes to the category heading nodes, I have the following Books array $book = array( "language"=> array("English","Franch","Arabic"), "Programming"=> array("PHP","JAVA","C++"), "Science"=> array("Physics","Geography","Math"), ); function treeView($book){ $markUp = ""; foreach($book as $cate => $subj){ $markUp .= "<li>".((is_array($subj))?$cate.treeView($subj):$subj)."</li>"; } return "<ul>$markUp</ul>"; } treeView($book); //------------------- The result is what I expected language English Franch Arabic Programming PHP JAVA C++ Science Physics Geography Math I want to do the following (adding class) <ul> <li class="language">language <ul> <li>English</li> <li>Franch</li> <li>Arabic</li> </ul> </li> <li class="Programming">Programming <ul> <li>PHP</li> <li>JAVA</li> <li>C++</li> </ul> </li> <li class="Science">Science <ul> <li>Physics</li> <li>Geography</li> <li>Math</li> </ul> </li> </ul> Your help is highly appreciated Thank you.
  2. Hello every one, today I created the count down timer , but I want to make using OOP style this time. the place where I stuck, is the setTimeout method can't call my class/function every 1000 miliseconds. Please I need your help, where I mess things up? Your help is highy appreciate, Thank you. Bellow is my code. <script type="text/javascript"> window.onload = function(){ function ticTock(ddt){ this.currentDate =new Date(); this.dueDate = new Date(ddt); this.diffDate = this.dueDate.getTime()-this.currentDate.getTime(); if(this.diffDate<=0){ clearTimeout(timer); document.write("closed") } this.seconds = Math.floor(this.diffDate/1000); this.minutes = Math.floor(this.seconds/60); this.hours = Math.floor(this.minutes/60); this.days = Math.floor(this.hours/24); this.hours %=24,this.minutes %=60,this.seconds%=60; this.remainder = this.days+'|'+this.hours+"|"+this.minutes+"|"+this.seconds; var timer = setTimeout(function(){ ticTock(ddt); },1000); } dueDate = "December 25, 2017 00:01:00"; dueDate2 = "December 25, 2019 00:01:00"; var obj = new ticTock(dueDate); var obj2 = new ticTock(dueDate2); document.body.innerHTML = obj.seconds; } </script>
  3. Dear all, Detect whether user is online/offline or typing I am working with php/mysql,jquery and actual want to advance my php skill, Now I am interested in doing something similar with fb chat which tells you if the receiver seen your message and it notifies when somebody is typing to you back. Also I want to detect whether user is online/offline I know here is the right place to be helped, if anyone can give me the URL to where this kind of discussion had been made or provide me with tutorial or any hints that could help me to achieve this. Your helps are highly appreciated Thank you.
  4. Hi everybody! I would like to ask for your help if it possible, I have a long sting and I want to chop it to small pieces. My string is:- $longstr = “Str1.htmlstr2.htmlstr3.html”; And I want the result to be like; $firstchoppedpiece = “Str1.html”; $secondchoppedpiece =”Str2.html”; $thirdchoppedpiece =”Str2.html”; Is it possible? Or is there any PHP function or method to break it into small pieace? Your replies are greatly appreciated. Thank very much.
  5. Hi everybody! I would like to ask for your help if it possible, I have a long sting and I want to chop it to small pieces. My string is:- $longstr = “Str1.htmlstr2.htmlstr3.html”; And I want the result to be like; $firstchoppedpiece = “Str1.html”; $secondchoppedpiece =”Str2.html”; $thirdchoppedpiece =”Str2.html”; Is it possible? Or is there any PHP function or method to break it into small pieace? Your replies are greatly appreciated. Thank very much.
  6. Thanks 4 the hints and I will try it out.
  7. Hello everybody, I do need your help on how to create the database(PHP/MYSQL)with categories and subcategories and which sql command(query) is relevant under this situation?. I tried goggling with no success, so please help me out. Your help is much appreciated. Thanks in advance,
  8. bobtutos

    Hi there!

    Thanks for the hints but as I am real new on Mysql/sql I do not how to go throw this, please if possible give me the code so that i can learn from that.
  9. bobtutos

    Hi there!

    I would like to ask for an assistance on how to select all rows but not the last row using PHP/MSQL database . Your help is much appreciated. Thanks.
×
×
  • Create New...