need help array and database

Discussion in 'PHP' started by synan54, Apr 14, 2012.

  1. #1
    hi i am working on a ajax search

    if i set an array manually it woks well for example
    $a[]="word";

    but i need to write a query gets every word from a column

    database name "synan"
    table name "user"

    username | user_com
    -----------------------------------
    george | hi this is my first comment
    michael | woow thats good

    manually it must be like this

    $a[]="hi";
    $a[]="this";
    $a[]="is";
    $a[]="my";
    $a[]="first";
    $a[]="comment";
    $a[]="woow";
    $a[]="thats";
    $a[]="good";


    thank you for helping
     
    synan54, Apr 14, 2012 IP
  2. synan54

    synan54 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i wonder if its possible and explained well
     
    synan54, Apr 14, 2012 IP
  3. alamest

    alamest Well-Known Member

    Messages:
    277
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    133
    #3
    is your problem is solved or are you looking for answer still..let me know..
     
    alamest, Apr 14, 2012 IP
  4. synan54

    synan54 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    still looking thanks for interest
     
    synan54, Apr 14, 2012 IP
  5. alamest

    alamest Well-Known Member

    Messages:
    277
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    133
    #5
    Can you tell exactly what are you looking for, cause I have a friend who can help me to solve it so if you organise your question than I can ask my friend for the solution..
     
    alamest, Apr 14, 2012 IP
  6. synan54

    synan54 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i am trying to add words from a column to an array one by one like this
    george comment is ="hi this is my first comment"
    michael comment is ="woow thats good"
    at the end od databe query i need this

    $a[]="hi";
    $a[]="this";
    $a[]="is";
    $a[]="my";
    $a[]="first";
    $a[]="comment";
    $a[]="woow";
    $a[]="thats";
    $a[]="good";
     
    synan54, Apr 14, 2012 IP
  7. synan54

    synan54 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanks dude
     
    synan54, Apr 14, 2012 IP